]> git.pld-linux.org Git - packages/python-setuptools.git/blobdiff - python-setuptools.spec
Use Python 3 Sphinx explicitly
[packages/python-setuptools.git] / python-setuptools.spec
index f6b388809c8c23372b48ac4ce144768a3ebbab7f..4f7c404b26f2574842a44e847a9ad05adba7043f 100644 (file)
@@ -4,47 +4,42 @@
 %bcond_with    tests   # "test" action (fails?)
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
-%bcond_with    bootstrap # build using old distribute
+%bcond_without python3_default # Use Python 3.x for easy_install executable
+
+%if %{without python3}
+%undefine      python3_default
+%endif
 
 %define                module  setuptools
 Summary:       A collection of enhancements to the Python distutils
 Summary(pl.UTF-8):     Zestaw rozszerzeń dla pythonowych distutils
 Name:          python-setuptools
-Version:       18.3
-Release:       2
+Version:       18.6.1
+Release:       3
 Epoch:         1
 License:       PSF or ZPL
 Group:         Development/Languages/Python
 #Source0Download: https://pypi.python.org/pypi/setuptools
 Source0:       https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
-# Source0-md5: 9ff0ec700f7e10f2eb72f34df387f53a
+# Source0-md5: d4797a533b3c7466fd36a791c2de94d2
 URL:           https://bitbucket.org/pypa/setuptools
 %if %(locale -a | grep -q '^en_US.UTF-8$'; echo $?)
 BuildRequires: glibc-localedb-all
 %endif
 %if %{with python2}
-%if %{with bootstrap}
-BuildRequires: python-distribute < 0.7
-%else
-BuildRequires: python-setuptools > 7.0
-BuildConflicts:        python-distribute < 0.7
-%endif
 BuildRequires: python-modules >= 1:2.6
+BuildConflicts:        python-distribute < 0.7
 %endif
 %if %{with python3}
-%if %{with bootstrap}
-BuildRequires: python3-distribute < 0.7
-%else
-BuildRequires: python3-setuptools > 7.0
-BuildConflicts:        python3-distribute < 0.7
-%endif
 BuildRequires: python3-modules >= 1:3.2
+BuildConflicts:        python3-distribute < 0.7
 %endif
 %if %{with apidocs}
-BuildRequires: python-rst.linker
-BuildRequires: sphinx-pdg
+BuildRequires: python3-rst.linker
+BuildRequires: sphinx-pdg-3
 %endif
 BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.710
 Requires:      python-modules >= 1:2.6
 Obsoletes:     python-distribute < 0.7
 Obsoletes:     python-setuptools-devel
@@ -82,6 +77,23 @@ setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
 szczególnie tych mających zależności od innych pakietów.
 
+%package -n easy_install
+Summary:       Python software installer
+Summary(pl.UTF-8):     Instalator oprogramowania napisanego w Pythonie
+Group:         Libraries/Python
+%if %{with python3_default}
+Requires:      python3-%{module} = %{epoch}:%{version}-%{release}
+%else
+Requires:      python-%{module} = %{epoch}:%{version}-%{release}
+%endif
+Conflicts:     python-setuptools < 1:18.6.1-2
+
+%description -n easy_install
+Python software installer.
+
+%description -n easy_install
+Instalator oprogramowania napisanego w Pythonie.
+
 %package apidocs
 Summary:       %{module} API documentation
 Summary(pl.UTF-8):     Dokumentacja API %{module}
@@ -102,41 +114,39 @@ touch CHANGES.txt
 %build
 %if %{with python2}
 LC_ALL=en_US.UTF-8 \
-%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%py_build %{?with_tests:test}
 %endif
 
 %if %{with python3}
 LC_ALL=en_US.UTF-8 \
-%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%py3_build %{?with_tests:test}
 %endif
 
 %if %{with apidocs}
 #%{__make} -C docs html
 # rst.linker needs sphinx-build to be run from directory containing "CHANGES.txt"
-sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs build/html
+sphinx-build-3 -b html -d build/doctrees -D latex_paper_size=a4 docs build/html
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with python3}
-%{__python3} setup.py \
-       build --build-base build-3 \
-       install --skip-build \
-       --optimize=2 \
-       --root=$RPM_BUILD_ROOT
+%py3_install
 %endif
 
 %if %{with python2}
-%{__python} setup.py \
-       build --build-base build-2 \
-       install --skip-build \
-       --optimize=2 \
-       --root=$RPM_BUILD_ROOT
+%py_install
 
 %py_postclean
 %endif
 
+%if %{with python3_default}
+ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
+%else
+ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -144,8 +154,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc README.txt
-%attr(755,root,root) %{_bindir}/easy_install
-%attr(755,root,root) %{_bindir}/easy_install-2.*
+%attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
 %{py_sitescriptdir}/pkg_resources
 %{py_sitescriptdir}/setuptools
 %{py_sitescriptdir}/_markerlib
@@ -157,7 +166,7 @@ rm -rf $RPM_BUILD_ROOT
 %files -n python3-%{module}
 %defattr(644,root,root,755)
 %doc README.txt
-%attr(755,root,root) %{_bindir}/easy_install-3.*
+%attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
 %{py3_sitescriptdir}/pkg_resources
 %{py3_sitescriptdir}/setuptools
@@ -166,6 +175,10 @@ rm -rf $RPM_BUILD_ROOT
 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
 %endif
 
+%files -n easy_install
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/easy_install
+
 %if %{with apidocs}
 %files apidocs
 %defattr(644,root,root,755)
This page took 0.032434 seconds and 4 git commands to generate.