Author: jajcus                       Date: Sat Jul 16 07:13:47 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- let's have this one for pypy too
- Release: 3

---- Files affected:
packages/python-distribute:
   python-distribute.spec (1.25 -> 1.26) 

---- Diffs:

================================================================
Index: packages/python-distribute/python-distribute.spec
diff -u packages/python-distribute/python-distribute.spec:1.25 
packages/python-distribute/python-distribute.spec:1.26
--- packages/python-distribute/python-distribute.spec:1.25      Fri Jul 15 
18:18:46 2011
+++ packages/python-distribute/python-distribute.spec   Sat Jul 16 09:13:42 2011
@@ -4,16 +4,24 @@
 %bcond_with            tests   # perform "make test"
 %bcond_without python2
 %if "%{pld_release}" == "ac"
-%bcond_with            python3
+%bcond_with    python3
+%bcond_without pypy
 %else
 %bcond_without python3
+%bcond_without pypy
 %endif
 
+%define        __pypy  /usr/bin/pypy
+%define pypy_ver       %{expand:%%global pypy_ver %(%{__pypy} -c "import sys; 
print '{0}.{1}'.format(*sys.pypy_version_info[:2])" 2>/dev/null || echo 
ERROR)}%pypy_ver
+%define pypy_py_ver    %{expand:%%global pypy_py_ver %(%{__python} -c "import 
sys; print sys.version[:3]" 2>/dev/null || echo ERROR)}%pypy_py_ver
+%define pypy_libdir    %{expand:%%global pypy_libdir %(%{__pypy} -c "import 
sys; print sys.prefix" 2>/dev/null || echo ERROR)}%pypy_libdir
+%define pypy_sitedir   %{pypy_libdir}/site-packages
+
 %define                pname   distribute
 Summary:       Easily download, build, install, upgrade, and uninstall Python 
packages
 Name:          python-distribute
 Version:       0.6.19
-Release:       2
+Release:       3
 License:       PSF or ZPL
 Group:         Development/Languages/Python
 Source0:       
http://pypi.python.org/packages/source/d/distribute/distribute-%{version}.tar.gz
@@ -30,6 +38,9 @@
 BuildRequires: python3-devel
 BuildRequires: python3-modules
 %endif
+%if %{with pypy}
+BuildRequires: pypy
+%endif
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.523
@@ -53,6 +64,16 @@
 Distribute is intended to replace Setuptools as the standard method
 for working with Python module distributions.
 
+%package -n pypy-%{pname}
+Summary:       Easily download, build, install, upgrade, and uninstall Python 
packages
+Group:         Development/Languages/Python
+
+%description -n pypy-%{pname}
+Distribute is a fork of the Setuptools project.
+
+Distribute is intended to replace Setuptools as the standard method
+for working with Python module distributions.
+
 %prep
 %setup -q -n %{pname}-%{version}
 
@@ -75,8 +96,19 @@
 %endif
 %endif
 
+%if %{with pypy}
+%{__pypy} setup.py \
+       build -b build-pypy
+
+%if %{with tests}
+%{__pypy} setup.py test
+%endif
+%endif
+
+
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %if %{with python2}
 %{__python} -- setup.py \
        build -b build-2 \
@@ -109,6 +141,19 @@
 rm -rf $RPM_BUILD_ROOT%{py3_sitescriptdir}/setuptools/tests
 %endif
 
+%if %{with pypy}
+%{__pypy} -- setup.py \
+       build -b build-pypy \
+       install \
+       --root=$RPM_BUILD_ROOT \
+       --optimize=1
+
+rm $RPM_BUILD_ROOT%{pypy_sitedir}/setuptools/*.exe
+rm -rf $RPM_BUILD_ROOT%{pypy_sitedir}/setuptools/tests
+mv $RPM_BUILD_ROOT%{pypy_libdir}/bin/easy_install 
$RPM_BUILD_ROOT%{_bindir}/easy_install-pypy-%{pypy_ver}
+rm $RPM_BUILD_ROOT%{pypy_libdir}/bin/easy_install*
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -153,12 +198,32 @@
 %{py3_sitescriptdir}/setuptools/command/__py[co]ache__/*.py[co]
 %endif
 
+%if %{with pypy}
+%files -n pypy-%{pname}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/easy_install-pypy*
+%{pypy_sitedir}/distribute-%{version}-py*.egg-info
+%{pypy_sitedir}/setuptools-*.egg-info
+%dir %{pypy_sitedir}/setuptools
+%dir %{pypy_sitedir}/setuptools/command
+%{pypy_sitedir}/site.py*
+%{pypy_sitedir}/setuptools.pth
+%{pypy_sitedir}/pkg_resources.py*
+%{pypy_sitedir}/easy_install.py*
+%{pypy_sitedir}/setuptools/*.py*
+%{pypy_sitedir}/setuptools/command/*.py*
+%endif
+
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <[email protected]>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.26  2011/07/16 07:13:42  jajcus
+- let's have this one for pypy too
+- Release: 3
+
 Revision 1.25  2011/07/15 16:18:46  jajcus
 - Release: 2
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/python-distribute/python-distribute.spec?r1=1.25&r2=1.26&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to