import python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3

This commit is contained in:
CentOS Sources 2019-11-05 16:26:45 -05:00 committed by Andrew Lukoshko
parent 1e475e0795
commit 9a2903dd3f

View File

@ -4,12 +4,22 @@
# because tests need pip.
%bcond_with bootstrap
%bcond_without tests
%bcond_without python2
%bcond_with 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
%global python2_wheeldir %{_datadir}/python2-wheels
%endif # with python2
%if %{with python3}
%global python3_wheelname %python_wheelname
%global python3_record %{python3_sitelib}/%{srcname}-%{version}.dist-info/RECORD
%global python3_wheeldir %{_datadir}/python3-wheels
%endif # with python3
%endif # without bootstrap
Name: python2-setuptools
Version: 39.0.1
@ -50,6 +60,23 @@ This package also contains the runtime components of setuptools, necessary to
execute the software that requires pkg_resources.py.
%if %{without bootstrap}
%if %{with python2}
%package -n python2-setuptools-wheel
Summary: The setuptools wheel
%description -n python2-setuptools-wheel
A Python wheel of setuptools to use with venv.
%endif #with python2
%if %{with python3}
%package -n python3-setuptools-wheel
Summary: The setuptools wheel
%description -n python3-setuptools-wheel
A Python wheel of setuptools to use with venv.
%endif #with python3
%endif
%prep
%setup -q -n %{srcname}-%{version}
@ -76,12 +103,23 @@ rm setuptools/tests/test_integration.py
%patch0 -p1
%build
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%if %{with python2}
%if %{without bootstrap}
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%py2_build_wheel
%else
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%py2_build
%endif
%endif # without bootstrap
%endif # with python2
%if %{with python3}
%if %{without bootstrap}
%py3_build_wheel
%else
%py3_build
%endif # without bootstrap
%endif # with python3
%install
@ -106,6 +144,18 @@ find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f
# Don't ship these
rm -r docs/{Makefile,conf.py,_*}
%if %{without bootstrap}
%if %{with python2}
mkdir -p %{buildroot}%{python2_wheeldir}
install -p dist/%{python2_wheelname} -t %{buildroot}%{python2_wheeldir}
%endif #with python2
%if %{with python3}
mkdir -p %{buildroot}%{python3_wheeldir}
install -p dist/%{python3_wheelname} -t %{buildroot}%{python3_wheeldir}
%endif #with python3
%endif
%if %{with tests}
%check
@ -121,11 +171,31 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python2_version} --ignore=
%{python2_sitelib}/*
%{_bindir}/easy_install-2*
%if %{without bootstrap}
%if %{with python2}
%files -n python2-setuptools-wheel
%license LICENSE
# we own the dir for simplicity
%dir %{python2_wheeldir}/
%{python2_wheeldir}/%{python2_wheelname}
%endif #with python2
%if %{with python3}
%files -n python3-setuptools-wheel
%license LICENSE
# we own the dir for simplicity
%dir %{python3_wheeldir}/
%{python3_wheeldir}/%{python3_wheelname}
%endif #with python3
%endif #with bootstrap
%changelog
* Wed Apr 03 2019 Tomas Orsava <torsava@redhat.com> - 39.0.1-11
- Bumping due to problems with modular RPM upgrade path (#1695587)
- Related: rhbz#1693974
* Tue Jun 18 2019 Petr Viktorin <pviktori@redhat.com> - 39.0.1-12
- Add subpackages with wheels
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 39.0.1-11
- Bumping due to problems with modular RPM upgrade path
- Resolves: rhbz#1695587
* Tue Aug 28 2018 Tomas Orsava <torsava@redhat.com> - 39.0.1-10
- Separate the python2-setuptools subpackage into its own component