]> git.pld-linux.org Git - packages/python-setuptools.git/blobdiff - python-setuptools.spec
- rebuild with python 3.8
[packages/python-setuptools.git] / python-setuptools.spec
index 2d6bd8a9198d6ee1a51597b952724eb95ae82e73..e02aa7ae22f7e9a3009d02a1eaf5f001f715d883 100644 (file)
@@ -1,7 +1,9 @@
 #
 # Conditional build:
 %bcond_without apidocs         # Sphinx based documentation
-%bcond_with    tests           # "test" action (fails, pytest-runner doesn't support build-base)
+%bcond_with    system_libs     # use system modules (appdirs, packaging, pyparsing, six) # TODO
+%bcond_with    tests           # py.test tests (few failures)
+%bcond_with    bootstrap       # convenience alias for without: apidocs,system_libs,tests
 %bcond_without python2         # CPython 2.x module
 %bcond_without python3         # CPython 3.x module
 %bcond_without python3_default # Use Python 3.x for easy_install executable
 %if %{without python3}
 %undefine      python3_default
 %endif
+%if %{with bootstrap}
+%undefine      with_apidocs
+%undefine      with_system_libs
+%undefine      with_tests
+%endif
 
-%define                module  setuptools
+%define                module          setuptools
+%define                pypi_name       setuptools
 Summary:       A collection of enhancements to the Python distutils
 Summary(pl.UTF-8):     Zestaw rozszerzeń dla pythonowych distutils
 Name:          python-setuptools
-Version:       21.0.0
+Version:       41.4.0
 Release:       2
 Epoch:         1
-License:       PSF or ZPL
+License:       MIT
 Group:         Development/Languages/Python
-#Source0Download: https://pypi.python.org/simple/setuptools/
-Source0:       https://pypi.python.org/packages/ff/d4/209f4939c49e31f5524fa0027bf1c8ec3107abaf7c61fdaad704a648c281/setuptools-%{version}.tar.gz
-# Source0-md5: 81964fdb89534118707742e6d1a1ddb4
-Patch0:                %{name}-missing.patch
+#Source0Download: https://pypi.org/simple/setuptools/
+Source0:       https://files.pythonhosted.org/packages/source/s/setuptools/%{pypi_name}-%{version}.zip
+# Source0-md5: 89a592d733b31e180a4b6ad760c0685a
 URL:           https://github.com/pypa/setuptools
-%if %(locale -a | grep -q '^en_US.UTF-8$'; echo $?)
+%if %(locale -a | grep -q '^C\.utf8$'; echo $?)
 BuildRequires: glibc-localedb-all
 %endif
 %if %{with python2}
-BuildRequires: python-modules >= 1:2.6
+BuildRequires: python-modules >= 1:2.7
+%if %{with system_libs}
+# versions from pkg_resources/_vendor/vendored.txt
+BuildRequires: python-appdirs >= 1.4.3
+BuildRequires: python-packaging >= 16.8
+BuildRequires: python-pyparsing >= 2.2.1
+BuildRequires: python-six >= 1.10.0
+%endif
 BuildConflicts:        python-distribute < 0.7
 %if %{with tests}
+BuildRequires: python-coverage >= 4.5.1
+BuildRequires: python-futures
 BuildRequires: python-mock
-BuildRequires: python-pytest >= 2.8
-BuildRequires: python-pytest-runner
+BuildRequires: python-pip >= 18.1
+BuildRequires: python-pytest >= 3.7
+BuildRequires: python-pytest-cov >= 2.5.1
+BuildRequires: python-pytest-fixture-config
+BuildRequires: python-pytest-flake8
+BuildRequires: python-pytest-virtualenv >= 1.2.7
+BuildRequires: python-virtualenv >= 13.0.0
+BuildRequires: python-wheel
 %endif
 %endif
 %if %{with python3}
-BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-modules >= 1:3.4
+%if %{with system_libs}
+# versions from pkg_resources/_vendor/vendored.txt
+BuildRequires: python3-appdirs >= 1.4.3
+BuildRequires: python3-packaging >= 16.8
+BuildRequires: python3-pyparsing >= 2.2.1
+BuildRequires: python3-six >= 1.10.0
+%endif
 BuildConflicts:        python3-distribute < 0.7
 %if %{with tests}
-%if "%{py3_ver}" < "3.3"
-BuildRequires: python3-mock
+BuildRequires: python3-coverage >= 4.5.1
+# FIXME: patch to use unittest.mock
+#BuildRequires:        python3-mock
+%if "%{py3_ver}" >= "3.6"
+BuildRequires: python3-paver
 %endif
-BuildRequires: python3-pytest >= 2.8
-BuildRequires: python3-pytest-runner
+BuildRequires: python3-pip >= 18.1
+BuildRequires: python3-pytest >= 3.7
+BuildRequires: python3-pytest-cov >= 2.5.1
+BuildRequires: python3-pytest-fixture-config
+BuildRequires: python3-pytest-flake8
+BuildRequires: python3-pytest-virtualenv >= 1.2.7
+BuildRequires: python3-virtualenv >= 13.0.0
+BuildRequires: python3-wheel
 %endif
 %endif
 %if %{with apidocs}
-BuildRequires: python3-rst.linker >= 1.4
-BuildRequires: sphinx-pdg-3
+BuildRequires: python3-jaraco
+BuildRequires: python3-jaraco.packaging >= 6.1
+BuildRequires: python3-rst.linker >= 1.9
+BuildRequires: python3-setuptools >= 34
+BuildRequires: sphinx-pdg-3 >= 1.4
 %endif
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
-Requires:      python-modules >= 1:2.6
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: unzip
+Requires:      python-modules >= 1:2.7
+%if %{with system_libs}
+# versions from pkg_resources/_vendor/vendored.txt
+Requires:      python-appdirs >= 1.4.0
+Requires:      python-packaging >= 16.8
+Requires:      python-pyparsing >= 2.1.10
+Requires:      python-six >= 1.10.0
+%endif
 Obsoletes:     python-distribute < 0.7
 Obsoletes:     python-setuptools-devel
 BuildArch:     noarch
@@ -77,7 +126,14 @@ Pythona 2.x.
 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
+Requires:      python3-modules >= 1:3.4
+%if %{with system_libs}
+# versions from pkg_resources/_vendor/vendored.txt
+Requires:      python3-appdirs >= 1.4.0
+Requires:      python3-packaging >= 16.8
+Requires:      python3-pyparsing >= 2.1.10
+Requires:      python3-six >= 1.10.0
+%endif
 Obsoletes:     python3-distribute < 0.7
 
 %description -n python3-%{module}
@@ -120,23 +176,28 @@ Dokumentacja API %{module}.
 
 %prep
 %setup -q -n %{module}-%{version}
-%patch0 -p1
+
+%if %{with system_libs}
+exit 1 # TODO: unvendor modules from pkg_resources/_vendor
+%endif
 
 %build
 %if %{with python2}
-LC_ALL=en_US.UTF-8 \
-%py_build %{?with_tests:test}
+LC_ALL=C.UTF-8 \
+%py_build
+
+%{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests}
 %endif
 
 %if %{with python3}
-LC_ALL=en_US.UTF-8 \
-%py3_build %{?with_tests:test}
+LC_ALL=C.UTF-8 \
+%py3_build
+
+%{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
 %endif
 
 %if %{with apidocs}
-#%{__make} -C docs html SPHINXBUILD=sphinx-build-3
-# rst.linker needs sphinx-build to be run from directory containing "CHANGES.txt"
-sphinx-build-3 -b html -d build/doctrees -D latex_paper_size=a4 docs build/html
+%{__make} -C docs html SPHINXBUILD=sphinx-build-3
 %endif
 
 %install
@@ -165,7 +226,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.rst README.rst
+%doc CHANGES.rst LICENSE README.rst
 %attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
 %{py_sitescriptdir}/pkg_resources
 %{py_sitescriptdir}/setuptools
@@ -176,7 +237,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc CHANGES.rst README.rst
+%doc CHANGES.rst LICENSE README.rst
 %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
 %{py3_sitescriptdir}/pkg_resources
@@ -192,5 +253,5 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with apidocs}
 %files apidocs
 %defattr(644,root,root,755)
-%doc build/html/*
+%doc docs/build/html/{_static,*.html,*.js}
 %endif
This page took 0.13557 seconds and 4 git commands to generate.