| |
@@ -5,39 +5,29 @@
|
| |
%bcond_with bootstrap
|
| |
%bcond_without tests
|
| |
|
| |
- %if 0%{?rhel} && 0%{?rhel} <= 7
|
| |
- %global _without_python3 1
|
| |
- # define some macros for RHEL 6
|
| |
- %global __python2 %__python
|
| |
- %global python2_sitelib %python_sitelib
|
| |
- %endif
|
| |
-
|
| |
- # Note(hguemar): overrides must be placed *before* those
|
| |
- # Otherwise it doesn't work
|
| |
%bcond_without python2
|
| |
- %bcond_without python3
|
| |
|
| |
%if %{without bootstrap}
|
| |
%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
|
| |
%if %{with python2}
|
| |
- %global python2_wheelname %python_wheelname
|
| |
%global python2_record %{python2_sitelib}/%{srcname}-%{version}.dist-info/RECORD
|
| |
%endif
|
| |
- %if %{with python3}
|
| |
- %global python3_wheelname %python_wheelname
|
| |
%global python3_record %{python3_sitelib}/%{srcname}-%{version}.dist-info/RECORD
|
| |
%endif
|
| |
- %endif
|
| |
+ %global python_wheeldir %{_datadir}/python-wheels
|
| |
|
| |
Name: python-setuptools
|
| |
- Version: 39.2.0
|
| |
- Release: 6%{?dist}
|
| |
+ # When updating, update the bundled libraries versions bellow!
|
| |
+ Version: 40.8.0
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Easily build and distribute Python packages
|
| |
-
|
| |
- Group: Applications/System
|
| |
- License: MIT
|
| |
+ # setuptools is MIT
|
| |
+ # packaging is BSD or ASL 2.0
|
| |
+ # pyparsing is MIT
|
| |
+ # six is MIT
|
| |
+ License: MIT and (BSD or ASL 2.0)
|
| |
URL: https://pypi.python.org/pypi/%{srcname}
|
| |
- Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.zip
|
| |
+ Source0: %{pypi_source %{srcname} %{version} zip}
|
| |
|
| |
# In Fedora, sudo setup.py install installs to /usr/local/lib/pythonX.Y/site-packages
|
| |
# But pythonX doesn't own that dir, that would be against FHS
|
| |
@@ -55,6 +45,7 @@
|
| |
BuildRequires: python2-wheel
|
| |
%endif # without bootstrap
|
| |
%if %{with tests}
|
| |
+ BuildRequires: python2-futures
|
| |
BuildRequires: python2-pip
|
| |
BuildRequires: python2-pytest
|
| |
BuildRequires: python2-mock
|
| |
@@ -64,7 +55,6 @@
|
| |
%endif # with tests
|
| |
%endif # with python2
|
| |
|
| |
- %if %{with python3}
|
| |
BuildRequires: python3-devel
|
| |
%if %{with tests}
|
| |
BuildRequires: python3-pip
|
| |
@@ -77,13 +67,6 @@
|
| |
BuildRequires: python3-pip
|
| |
BuildRequires: python3-wheel
|
| |
%endif # without bootstrap
|
| |
- %endif # with python3
|
| |
-
|
| |
- # We're now back to setuptools as the package.
|
| |
- # Keep the python-distribute name active for a few releases. Eventually we'll
|
| |
- # want to get rid of the Provides and just keep the Obsoletes
|
| |
- Provides: python-distribute = %{version}-%{release}
|
| |
- Obsoletes: python-distribute < 0.6.36-2
|
| |
|
| |
%description
|
| |
Setuptools is a collection of enhancements to the Python distutils that allow
|
| |
@@ -93,11 +76,19 @@
|
| |
This package also contains the runtime components of setuptools, necessary to
|
| |
execute the software that requires pkg_resources.py.
|
| |
|
| |
+ # Virtual provides for the packages bundled by setuptools.
|
| |
+ # You can find the versions in setuptools/setuptools/_vendor/vendored.txt
|
| |
+ %global bundled() %{expand:
|
| |
+ Provides: bundled(python%{1}dist(packaging)) = 16.8
|
| |
+ Provides: bundled(python%{1}dist(pyparsing)) = 2.2.1
|
| |
+ Provides: bundled(python%{1}dist(six)) = 1.10.0
|
| |
+ }
|
| |
|
| |
%if %{with python2}
|
| |
%package -n python2-setuptools
|
| |
Summary: Easily build and distribute Python packages
|
| |
%{?python_provide:%python_provide python2-setuptools}
|
| |
+ %{bundled 2}
|
| |
|
| |
%description -n python2-setuptools
|
| |
Setuptools is a collection of enhancements to the Python distutils that allow
|
| |
@@ -110,12 +101,11 @@
|
| |
%endif # with python2
|
| |
|
| |
|
| |
- %if %{with python3}
|
| |
%package -n python3-setuptools
|
| |
Summary: Easily build and distribute Python 3 packages
|
| |
- Group: Applications/System
|
| |
%{?python_provide:%python_provide python3-setuptools}
|
| |
Obsoletes: platform-python-setuptools < %{version}-%{release}
|
| |
+ %{bundled 3}
|
| |
|
| |
%description -n python3-setuptools
|
| |
Setuptools is a collection of enhancements to the Python 3 distutils that allow
|
| |
@@ -125,7 +115,15 @@
|
| |
This package also contains the runtime components of setuptools, necessary to
|
| |
execute the software that requires pkg_resources.py.
|
| |
|
| |
- %endif # with python3
|
| |
+ %if %{without bootstrap}
|
| |
+ %package wheel
|
| |
+ Summary: The setuptools wheel
|
| |
+ %{bundled 2}
|
| |
+ %{bundled 3}
|
| |
+
|
| |
+ %description wheel
|
| |
+ A Python wheel of setuptools to use with venv.
|
| |
+ %endif
|
| |
|
| |
|
| |
%prep
|
| |
@@ -144,37 +142,32 @@
|
| |
# otherwise setuptools are installed as dependency into buildroot
|
| |
|
| |
# Strip shbang
|
| |
- find setuptools -name \*.py | xargs sed -i -e '1 {/^#!\//d}'
|
| |
+ find setuptools pkg_resources -name \*.py | xargs sed -i -e '1 {/^#!\//d}'
|
| |
# Remove bundled exes
|
| |
rm -f setuptools/*.exe
|
| |
# These tests require internet connection
|
| |
rm setuptools/tests/test_integration.py
|
| |
+ # Spurious executable perm https://github.com/pypa/setuptools/pull/1441
|
| |
+ chmod -x README.rst
|
| |
|
| |
%build
|
| |
- %if %{with python2}
|
| |
%if %{without bootstrap}
|
| |
- %py2_build_wheel
|
| |
+ %py3_build_wheel
|
| |
%else
|
| |
+ %if %{with python2}
|
| |
%py2_build
|
| |
- %endif
|
| |
%endif # with python2
|
| |
|
| |
- %if %{with python3}
|
| |
- %if %{without bootstrap}
|
| |
- %py3_build_wheel
|
| |
- %else
|
| |
%py3_build
|
| |
%endif
|
| |
- %endif # with python3
|
| |
|
| |
|
| |
%install
|
| |
# Must do the python3 install first because the scripts in /usr/bin are
|
| |
- # overwritten with every setup.py install (and we want the python2 version to
|
| |
- # be the default for now).
|
| |
- %if %{with python3}
|
| |
+ # overwritten with every setup.py install (and we want /usr/bin/pip to be
|
| |
+ # the python2 version).
|
| |
%if %{without bootstrap}
|
| |
- %py3_install_wheel %{python3_wheelname}
|
| |
+ %py3_install_wheel %{python_wheelname}
|
| |
|
| |
# Remove /usr/bin/easy_install from the record as later on we delete the file
|
| |
sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record}
|
| |
@@ -192,12 +185,11 @@
|
| |
%endif
|
| |
|
| |
find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f
|
| |
- %endif # with python3
|
| |
|
| |
|
| |
%if %{with python2}
|
| |
%if %{without bootstrap}
|
| |
- %py2_install_wheel %{python2_wheelname}
|
| |
+ %py2_install_wheel %{python_wheelname}
|
| |
%else
|
| |
%py2_install
|
| |
%endif
|
| |
@@ -213,6 +205,11 @@
|
| |
# Don't ship these
|
| |
rm -r docs/{Makefile,conf.py,_*}
|
| |
|
| |
+ %if %{without bootstrap}
|
| |
+ mkdir -p %{buildroot}%{python_wheeldir}
|
| |
+ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
| |
+ %endif
|
| |
+
|
| |
|
| |
%if %{with tests}
|
| |
%check
|
| |
@@ -221,12 +218,10 @@
|
| |
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python2_version}
|
| |
%endif # with python2
|
| |
|
| |
- %if %{with python3}
|
| |
# --ignore=setuptools/tests/test_virtualenv.py: because virtualenv executable
|
| |
# is configured only for Python 2 version of virtualenv—this needs to be fixed
|
| |
# in the `python-pytest-virtualenv` package
|
| |
- PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore=setuptools/tests/test_virtualenv.py
|
| |
- %endif # with python3
|
| |
+ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore=setuptools/tests/test_virtualenv.py --ignore=pavement.py
|
| |
%endif # with tests
|
| |
|
| |
|
| |
@@ -239,7 +234,6 @@
|
| |
%{_bindir}/easy_install-2.*
|
| |
%endif # with python2
|
| |
|
| |
- %if %{with python3}
|
| |
%files -n python3-setuptools
|
| |
%license LICENSE
|
| |
%doc docs/* CHANGES.rst README.rst
|
| |
@@ -248,10 +242,54 @@
|
| |
%{python3_sitelib}/setuptools*/
|
| |
%{python3_sitelib}/__pycache__/*
|
| |
%{_bindir}/easy_install-3.*
|
| |
- %endif # with python3
|
| |
+
|
| |
+ %if %{without bootstrap}
|
| |
+ %files wheel
|
| |
+ %license LICENSE
|
| |
+ # we own the dir for simplicity
|
| |
+ %dir %{python_wheeldir}/
|
| |
+ %{python_wheeldir}/%{python_wheelname}
|
| |
+ %endif
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Tue Feb 05 2019 Miro Hrončok <mhroncok@redhat.com>
|
| |
+ - Update to 40.8.0 (#1672756)
|
| |
+ - https://github.com/pypa/setuptools/blob/v40.8.0/CHANGES.rst
|
| |
+
|
| |
+ * Sun Feb 03 2019 Miro Hrončok <mhroncok@redhat.com> - 40.7.3-1
|
| |
+ - Hotfix update to 40.7.3 (#1672084)
|
| |
+ - https://github.com/pypa/setuptools/blob/v40.7.3/CHANGES.rst
|
| |
+
|
| |
+ * Sat Feb 02 2019 Miro Hrončok <mhroncok@redhat.com> - 40.7.2-1
|
| |
+ - Hotfix update to 40.7.2 (#1671608)
|
| |
+ - https://github.com/pypa/setuptools/blob/v40.7.2/CHANGES.rst
|
| |
+
|
| |
+ * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 40.7.1-2
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
| |
+
|
| |
+ * Tue Jan 29 2019 Miro Hrončok <mhroncok@redhat.com> - 40.7.1-1
|
| |
+ - Hotfix update to 40.7.1 (#1670243)
|
| |
+ - https://github.com/pypa/setuptools/blob/v40.7.1/CHANGES.rst
|
| |
+
|
| |
+ * Mon Jan 28 2019 Miro Hrončok <mhroncok@redhat.com> - 40.7.0-1
|
| |
+ - Update to 40.7.0 (#1669876)
|
| |
+ - https://github.com/pypa/setuptools/blob/v40.7.0/CHANGES.rst
|
| |
+
|
| |
+ * Mon Sep 24 2018 Miro Hrončok <mhroncok@redhat.com> - 40.4.3-1
|
| |
+ - Update to 40.4.3 to fix dire DeprecationWarnings (#1627071)
|
| |
+ - List vendored libraries
|
| |
+ - https://github.com/pypa/setuptools/blob/v40.4.3/CHANGES.rst
|
| |
+
|
| |
+ * Wed Sep 19 2018 Randy Barlow <bowlofeggs@fedoraproject.org> - 40.4.1-1
|
| |
+ - Update to 40.4.1 (#1599307).
|
| |
+ - https://github.com/pypa/setuptools/blob/v40.4.1/CHANGES.rst
|
| |
+
|
| |
+ * Wed Aug 15 2018 Petr Viktorin <pviktori@redhat.com> - 39.2.0-7
|
| |
+ - Add a subpackage with wheels
|
| |
+ - Remove the python3 bcond
|
| |
+ - Remove macros for RHEL 6
|
| |
+
|
| |
* Thu Jul 19 2018 Miro Hrončok <mhroncok@redhat.com> - 39.2.0-6
|
| |
- Create /usr/local/lib/pythonX.Y when needed (#1576924)
|
| |
|
| |
To fix https://bugzilla.redhat.com/show_bug.cgi?id=1679630
Please, review the changelog carefully. We don't want to break anything.
This adds the python-setuptools-wheel package unnecessarily, but I see no harm in that (and it is easier to keep the branches in sync).