From 9aae6c0bc4ec85e3aff11f3d54fb6f14f05b516e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 05 2019 22:00:41 +0000 Subject: import python-setuptools-39.2.0-5.el8 --- diff --git a/SPECS/python-setuptools.spec b/SPECS/python-setuptools.spec index 34984c2..d2dbfe1 100644 --- a/SPECS/python-setuptools.spec +++ b/SPECS/python-setuptools.spec @@ -24,16 +24,18 @@ %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 -%endif -%endif +%global python3_wheeldir %{_datadir}/python3-wheels +%endif # with python3 +%endif # without bootstrap Name: python-setuptools Version: 39.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Easily build and distribute Python packages Group: Applications/System @@ -113,6 +115,25 @@ Requires: platform-python-setuptools = %{version}-%{release} %endif # with python3 +%if %{without bootstrap} +%if %{with py2_wheel} +%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 +%endif #with py2_wheel + +%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 #with bootstrap %prep %setup -q -n %{srcname}-%{version} @@ -137,13 +158,15 @@ rm -f setuptools/*.exe rm setuptools/tests/test_integration.py %build + %if %{with python2} +%if %{with py2_wheel} && %{without bootstrap} export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 -%if %{with py2_wheel} %py2_build_wheel %else +export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 %py2_build -%endif +%endif # without bootstrap + py2_wheel %endif # with python2 %if %{with python3} @@ -151,7 +174,7 @@ export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 %py3_build_wheel %else %py3_build -%endif +%endif # without bootstrap %endif # with python3 @@ -188,12 +211,12 @@ export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 %py2_install_wheel %{python2_wheelname} %else %py2_install -%endif +%endif #with py2_wheel rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests %if %{with py2_wheel} sed -i '/^setuptools\/tests\//d' %{buildroot}%{python2_record} -%endif +%endif # with py2_wheel find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f %endif # with python2 @@ -201,6 +224,20 @@ find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f # Don't ship these rm -r docs/{Makefile,conf.py,_*} +%if %{without bootstrap} +%if %{with py2_wheel} +%if %{with python2} +mkdir -p %{buildroot}%{python2_wheeldir} +install -p dist/%{python2_wheelname} -t %{buildroot}%{python2_wheeldir} +%endif #with python2 +%endif #with py2_wheel + +%if %{with python3} +mkdir -p %{buildroot}%{python3_wheeldir} +install -p dist/%{python3_wheelname} -t %{buildroot}%{python3_wheeldir} +%endif #with python3 +%endif #with bootstrap + %if %{with tests} %check @@ -239,8 +276,32 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore= %{python3_sitelib}/__pycache__/* %endif # with python3 +%if %{without bootstrap} +%if %{with py2_wheel} +%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 +%endif #with py2_wheel + +%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 17 2019 Petr Viktorin - 39.0.1-10 +- Add subpackages with wheels +Resolves: rhbz#1718032 + * Mon Oct 22 2018 Lumír Balhar - 39.2.0-4 - New subpackage platform-python-setuptools without files from /usr/bin/* - python3-setuptools contains only files from /usr/bin/* and depends