From 65e6ab3c6067c9f040eb6ad641956b18dcf809f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 16 Aug 2018 12:21:24 +0200 Subject: [PATCH] Put wheels needed for Python 2.6 into a subpackage --- python-virtualenv.spec | 62 +++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/python-virtualenv.spec b/python-virtualenv.spec index f3bd66a..c91a413 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -58,6 +58,7 @@ Summary: Tool to create isolated Python environments Requires: python2-setuptools Requires: python2-devel +Requires: (python2-virtualenv-python26 = %{version}-%{release} if python26) %{?python_provide:%python_provide python2-virtualenv} # RPM installed wheels @@ -65,17 +66,28 @@ Requires: python-pip-wheel Requires: python-setuptools-wheel Requires: python-wheel-wheel +%description -n python2-virtualenv +virtualenv is a tool to create isolated Python environments. virtualenv +is a successor to workingenv, and an extension of virtual-python. It is +written by Ian Bicking, and sponsored by the Open Planning Project. It is +licensed under an MIT-style permissive license + + +%package -n python2-virtualenv-python26 +Summary: Extra bits of virtuelenv only needed with Python 2.6 +Requires: python2-virtualenv = %{version}-%{release} +%{?python_provide:%python_provide python2-virtualenv-python26} + # bundled wheels for Python 2.6 Provides: bundled(python2dist(argparse)) = 1.4.0 Provides: bundled(python2dist(pip)) = 9.0.3 Provides: bundled(python2dist(setuptools)) = 36.8.0 Provides: bundled(python2dist(wheel)) = 0.29.0 -%description -n python2-virtualenv -virtualenv is a tool to create isolated Python environments. virtualenv -is a successor to workingenv, and an extension of virtual-python. It is -written by Ian Bicking, and sponsored by the Open Planning Project. It is -licensed under an MIT-style permissive license +%description -n python2-virtualenv-python26 +This package contains wheels of older versions of argparse, pip, setuptools and +wheel that are required for virtualenv to create Python 2.6 virtual +environments. %if 0%{?with_python3} @@ -90,6 +102,7 @@ Summary: Tool to create isolated Python environments Requires: python3-setuptools Requires: python3-devel +Requires: (python3-virtualenv-python26 = %{version}-%{release} if python26) %{?python_provide:%python_provide python3-virtualenv} # RPM installed wheels @@ -97,12 +110,6 @@ Requires: python-pip-wheel Requires: python-setuptools-wheel Requires: python-wheel-wheel -# bundled wheels for Python 2.6 -Provides: bundled(python3dist(argparse)) = 1.4.0 -Provides: bundled(python3dist(pip)) = 10.0.1 -Provides: bundled(python3dist(setuptools)) = 36.8.0 -Provides: bundled(python3dist(wheel)) = 0.29.0 - %description -n python3-virtualenv virtualenv is a tool to create isolated Python environments. virtualenv is a successor to workingenv, and an extension of virtual-python. It is @@ -111,6 +118,22 @@ licensed under an MIT-style permissive license %endif # with_python3 +%package -n python3-virtualenv-python26 +Summary: Extra bits of virtuelenv only needed with Python 2.6 +Requires: python3-virtualenv = %{version}-%{release} +%{?python_provide:%python_provide python3-virtualenv-python26} + +# bundled wheels for Python 2.6 +Provides: bundled(python2dist(argparse)) = 1.4.0 +Provides: bundled(python2dist(pip)) = 9.0.3 +Provides: bundled(python2dist(setuptools)) = 36.8.0 +Provides: bundled(python2dist(wheel)) = 0.29.0 + +%description -n python3-virtualenv-python26 +This package contains wheels of older versions of argparse, pip, setuptools and +wheel that are required for virtualenv to create Python 2.6 virtual +environments. + %prep %autosetup -p1 -S git -n virtualenv-%{version} %{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py @@ -160,11 +183,18 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2 %license LICENSE.txt %doc docs/*rst PKG-INFO AUTHORS.txt -%{python2_sitelib}/* +%{python2_sitelib}/virtualenv.py* +%dir %{python2_sitelib}/virtualenv_support/ +%{python2_sitelib}/virtualenv_support/__init__.py* +%{python2_sitelib}/virtualenv-*.egg-info/ %{_bindir}/virtualenv %{_bindir}/virtualenv-2 %{_bindir}/virtualenv-%{python2_version} +%files -n python2-virtualenv-python26 +%{python2_sitelib}/virtualenv_support/*.whl + + %if 0%{?with_python3} # Include sphinx docs on Fedora %files -n python-virtualenv-doc @@ -177,9 +207,14 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2 %{_bindir}/virtualenv-3 %{_bindir}/virtualenv-%{python3_version} %{python3_sitelib}/virtualenv.py -%{python3_sitelib}/virtualenv_support/ +%dir %{python3_sitelib}/virtualenv_support/ +%{python3_sitelib}/virtualenv_support/__init__.py +%{python3_sitelib}/virtualenv_support/__pycache__/ %{python3_sitelib}/virtualenv-*.egg-info/ %{python3_sitelib}/__pycache__/* + +%files -n python3-virtualenv-python26 +%{python3_sitelib}/virtualenv_support/*.whl %endif @@ -187,6 +222,7 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2 %changelog * Wed Aug 15 2018 Miro Hrončok - 16.0.0-5 - Use wheels from RPM packages +- Put wheels needed for Python 2.6 into a subpackage * Wed Jul 18 2018 Miro Hrončok - 16.0.0-4 - Reintroduce support for Python 2.6 (#1602347)