X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=python-setuptools.spec;h=cb842ad54b4b600a1c25949d85892d9a6920bf00;hb=64c5aa5e97487c2879a621605724e4e64f85a933;hp=d83d42a5c525682d109facfaeb3bd9bf41219d13;hpb=cb552c1a18ee6358f9688e55055a0aea2d6d51be;p=packages%2Fpython-setuptools.git diff --git a/python-setuptools.spec b/python-setuptools.spec index d83d42a..cb842ad 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -1,67 +1,169 @@ +# +# Conditional build: +%bcond_without apidocs # sphinx based documentation +%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 + %define module setuptools -%define subver r60636 -%define rel 1 Summary: A collection of enhancements to the Python distutils Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils Name: python-setuptools -Version: 0.6 -Release: 0.%{subver}.%{rel} +Version: 14.3.1 +Release: 1 Epoch: 1 -License: GPL +License: PSF or ZPL Group: Development/Languages/Python -#Source0: http://cheeseshop.python.org/packages/source/s/setuptools/setuptools-%{version}%{sub}.tar.gz -Source0: setuptools-0.6r60636.tar.bz2 -# Source0-md5: dedbf6a4f71cd6deaf13ee885054f16b -URL: http://peak.telecommunity.com/DevCenter/setuptools -BuildRequires: findutils -%pyrequires_eq python -BuildRequires: python-devel -Requires: python-devel +#Source0Download: https://pypi.python.org/pypi/setuptools +Source0: https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz +# Source0-md5: cdba2741b16acaa3ed06c2252623f6b9 +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 +%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 +%endif +%if %{with apidocs} +BuildRequires: python-rst.linker +BuildRequires: sphinx-pdg +%endif +BuildRequires: rpm-pythonprov +Requires: python-modules >= 1:2.6 +Obsoletes: python-distribute < 0.7 +Obsoletes: python-setuptools-devel BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description setuptools is a collection of enhancements to the Python distutils -(for Python 2.3.5 and up on most platforms; 64-bit platforms require a -minimum of Python 2.4) that allow you to more easily build and -distribute Python packages, especially ones that have dependencies on -other packages. +that allow you to more easily build and distribute Python 2.x +packages, especially ones that have dependencies on other packages. %description -l pl.UTF-8 -setuptools to zestaw rozszerzeń do pythonowych distutils (dla Pythona -2.3.5 i nowszego na większości platform; platformy 64-bitowe wymagają -co najmniej Pythona 2.4) umożliwiający łatwiejsze budowanie i -rozprowadzanie pakietów Pythona, szczególnie tych mających zależności -od innych pakietów. +setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający +łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x, +szczególnie tych mających zależności od innych pakietów. + +Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do +uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla +Pythona 2.x. + +%package -n python3-%{module} +Summary: A collection of enhancements to the Python distutils +Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils +Group: Libraries/Python +Requires: python3-modules >= 1:3.2 + +%description -n python3-%{module} +setuptools is a collection of enhancements to the Python distutils +that allow you to more easily build and distribute Python 3.x +packages, especially ones that have dependencies on other packages. + +%description -n python3-%{module} -l pl.UTF-8 +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 apidocs +Summary: %{module} API documentation +Summary(pl.UTF-8): Dokumentacja API %{module} +Group: Documentation + +%description apidocs +API documentation for %{module}. + +%description apidocs -l pl.UTF-8 +Dokumentacja API %{module}. %prep %setup -q -n %{module}-%{version} %build -python ./setup.py build +%if %{with python2} +LC_ALL=en_US.UTF-8 \ +%{__python} setup.py build --build-base build-2 %{?with_tests:test} +%endif + +%if %{with python3} +LC_ALL=en_US.UTF-8 \ +%{__python3} setup.py build --build-base build-3 %{?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 +%endif %install rm -rf $RPM_BUILD_ROOT -python ./setup.py install \ - --single-version-externally-managed \ - --optimize 2 \ +%if %{with python3} +%{__python3} setup.py \ + build --build-base build-3 \ + install --skip-build \ + --optimize=2 \ --root=$RPM_BUILD_ROOT +%endif -rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*/*.exe +%if %{with python2} +%{__python} setup.py \ + build --build-base build-2 \ + install --skip-build \ + --optimize=2 \ + --root=$RPM_BUILD_ROOT -%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} -%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} %py_postclean -install site.py $RPM_BUILD_ROOT%{py_sitescriptdir} +%endif %clean rm -rf $RPM_BUILD_ROOT +%if %{with python2} %files %defattr(644,root,root,755) -%doc *.txt -%attr(755,root,root) %{_bindir}/* -%{py_sitescriptdir}/%{module}* -%{py_sitescriptdir}/*.py[co] -%{py_sitescriptdir}/site.py +%doc CHANGES.txt README.txt DEVGUIDE.txt +%attr(755,root,root) %{_bindir}/easy_install +%attr(755,root,root) %{_bindir}/easy_install-2.* +%{py_sitescriptdir}/pkg_resources +%{py_sitescriptdir}/setuptools +%{py_sitescriptdir}/_markerlib +%{py_sitescriptdir}/easy_install.py[co] +%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info +%endif + +%if %{with python3} +%files -n python3-%{module} +%defattr(644,root,root,755) +%doc CHANGES.txt README.txt DEVGUIDE.txt +%attr(755,root,root) %{_bindir}/easy_install-3.* +%{py3_sitescriptdir}/__pycache__/easy_install.*.py[co] +%{py3_sitescriptdir}/pkg_resources +%{py3_sitescriptdir}/setuptools +%{py3_sitescriptdir}/_markerlib +%{py3_sitescriptdir}/easy_install.py +%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info +%endif + +%if %{with apidocs} +%files apidocs +%defattr(644,root,root,755) +%doc build/html/* +%endif