Author: wiget                        Date: Sat Mar 27 15:44:57 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- build python2 and python3 version from one spec
- release 3

---- Files affected:
packages/python-distribute:
   python-distribute.spec (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: packages/python-distribute/python-distribute.spec
diff -u packages/python-distribute/python-distribute.spec:1.9 
packages/python-distribute/python-distribute.spec:1.10
--- packages/python-distribute/python-distribute.spec:1.9       Sun Feb 28 
17:49:38 2010
+++ packages/python-distribute/python-distribute.spec   Sat Mar 27 16:44:52 2010
@@ -1,19 +1,29 @@
 # $Revision$, $Date$
 %bcond_with    tests   # enble tests
+%bcond_without python2
+%bcond_without python3
 #
 %define                pname   distribute
 Summary:       Easily download, build, install, upgrade, and uninstall Python 
packages
 Name:          python-distribute
 Version:       0.6.10
-Release:       1
+Release:       3
 License:       PSF or ZPL
 Group:         Development/Languages/Python
 Source0:       
http://pypi.python.org/packages/source/d/distribute/distribute-%{version}.tar.gz
 # Source0-md5: 99fb4b3e4ef0861bba11aa1905e89fed
 URL:           http://pypi.python.org/pypi/distribute
+%if %{with python2}
 BuildRequires: python
 BuildRequires: python-devel
 BuildRequires: python-modules
+%endif
+%if %{with python3}
+BuildRequires: python3
+BuildRequires: python3-2to3 >= 1:3.1.1-3
+BuildRequires: python3-devel
+BuildRequires: python3-modules
+%endif
 BuildRequires: rpm-build-macros >= 1.523
 BuildRequires: rpm-pythonprov
 Provides:      python-setuptools = 1:0.6-3
@@ -26,20 +36,44 @@
 Distribute is intended to replace Setuptools as the standard method
 for working with Python module distributions.
 
+%package -n python3-%{pname}
+Summary:       Easily download, build, install, upgrade, and uninstall Python 
packages
+Group:         Development/Languages/Python
+
+%description -n python3-%{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}
 
 %build
-python setup.py \
-       build
+%if %{with python2}
+%{__python} setup.py \
+       build -b build-2
 
 %if %{with tests}
-python setup.py test
+%{__python} setup.py test
+%endif
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+       build -b build-3
+
+%if %{with tests}
+%{__python3} setup.py test
+%endif
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-python -- setup.py install \
+%if %{with python2}
+%{__python} -- setup.py \
+       build -b build-2 \
+       install \
        --root=$RPM_BUILD_ROOT \
        --optimize=2
 
@@ -49,14 +83,31 @@
 rm $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools/*.exe
 rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/setuptools/tests
 # reinstall site.py deleted by py_postclean
-cp site.py $RPM_BUILD_ROOT%{py_sitescriptdir}/site.py
+cp build-2/lib/site.py $RPM_BUILD_ROOT%{py_sitescriptdir}/site.py
+%endif
+
+%if %{with python3}
+%{__python3} -- setup.py \
+       build -b build-3 \
+       install \
+       --root=$RPM_BUILD_ROOT \
+       --optimize=2
+
+# shutup check-files
+%py3_postclean
+rm $RPM_BUILD_ROOT%{_bindir}/easy_install
+rm $RPM_BUILD_ROOT%{py3_sitescriptdir}/setuptools/*.exe
+rm -rf $RPM_BUILD_ROOT%{py3_sitescriptdir}/setuptools/tests
+# reinstall site.py deleted by py3_postclean
+cp build-3/lib/site.py $RPM_BUILD_ROOT%{py3_sitescriptdir}/site.py
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-#%doc *.txt docs
 %attr(755,root,root) %{_bindir}/easy_install-2.*
 %{py_sitescriptdir}/*.egg-info
 %dir %{py_sitescriptdir}/setuptools
@@ -68,6 +119,23 @@
 %{py_sitescriptdir}/setuptools.pth
 %{py_sitescriptdir}/setuptools/*.py[co]
 %{py_sitescriptdir}/setuptools/command/*.py[co]
+%endif
+
+%if %{with python3}
+%files -n python3-%{pname}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/easy_install-3.*
+%{py3_sitescriptdir}/*.egg-info
+%dir %{py3_sitescriptdir}/setuptools
+%dir %{py3_sitescriptdir}/setuptools/command
+%{py3_sitescriptdir}/pkg_resources.py[co]
+%{py3_sitescriptdir}/easy_install.py[co]
+%{py3_sitescriptdir}/site.py
+%{py3_sitescriptdir}/site.py[co]
+%{py3_sitescriptdir}/setuptools.pth
+%{py3_sitescriptdir}/setuptools/*.py[co]
+%{py3_sitescriptdir}/setuptools/command/*.py[co]
+%endif
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -75,6 +143,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.10  2010/03/27 15:44:52  wiget
+- build python2 and python3 version from one spec
+- release 3
+
 Revision 1.9  2010/02/28 16:49:38  wiget
 - 0.6.10
 
================================================================

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

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

Reply via email to