| |
@@ -8,7 +8,7 @@
|
| |
|
| |
Name: python-virtualenv
|
| |
Version: 16.0.0
|
| |
- Release: 4%{?dist}
|
| |
+ Release: 5%{?dist}
|
| |
Summary: Tool to create isolated Python environments
|
| |
|
| |
Group: Development/Languages
|
| |
@@ -28,6 +28,9 @@
|
| |
# the change needs to be properly communicated with Python SIG!
|
| |
Patch1: python26.patch
|
| |
|
| |
+ # Add /usr/share/python-wheels to file_search_dirs
|
| |
+ Patch2: rpm-wheels.patch
|
| |
+
|
| |
BuildArch: noarch
|
| |
BuildRequires: git-core
|
| |
BuildRequires: python2-devel
|
| |
@@ -38,6 +41,11 @@
|
| |
BuildRequires: python3-sphinx
|
| |
%endif # with_python3
|
| |
|
| |
+ # RPM installed wheels
|
| |
+ BuildRequires: python-pip-wheel
|
| |
+ BuildRequires: python-setuptools-wheel
|
| |
+ BuildRequires: python-wheel-wheel
|
| |
+
|
| |
%description
|
| |
virtualenv is a tool to create isolated Python environments. virtualenv
|
| |
is a successor to workingenv, and an extension of virtual-python. It is
|
| |
@@ -50,16 +58,13 @@
|
| |
|
| |
Requires: python2-setuptools
|
| |
Requires: python2-devel
|
| |
+ Requires: (python2-virtualenv-python26 = %{version}-%{release} if python26)
|
| |
%{?python_provide:%python_provide python2-virtualenv}
|
| |
|
| |
- # bundled wheels
|
| |
- Provides: bundled(python2dist(argparse)) = 1.4.0
|
| |
- Provides: bundled(python2dist(pip)) = 9.0.3
|
| |
- Provides: bundled(python2dist(pip)) = 10.0.1
|
| |
- Provides: bundled(python2dist(setuptools)) = 36.8.0
|
| |
- Provides: bundled(python2dist(setuptools)) = 39.1.0
|
| |
- Provides: bundled(python2dist(wheel)) = 0.29.0
|
| |
- Provides: bundled(python2dist(wheel)) = 0.31.1
|
| |
+ # RPM installed wheels
|
| |
+ 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
|
| |
@@ -68,6 +73,23 @@
|
| |
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-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}
|
| |
%package -n python-virtualenv-doc
|
| |
Summary: Documentation for python virtualenv
|
| |
@@ -80,16 +102,13 @@
|
| |
|
| |
Requires: python3-setuptools
|
| |
Requires: python3-devel
|
| |
+ Requires: (python3-virtualenv-python26 = %{version}-%{release} if python26)
|
| |
%{?python_provide:%python_provide python3-virtualenv}
|
| |
|
| |
- # bundled wheels
|
| |
- Provides: bundled(python3dist(argparse)) = 1.4.0
|
| |
- Provides: bundled(python3dist(pip)) = 9.0.3
|
| |
- Provides: bundled(python3dist(pip)) = 10.0.1
|
| |
- Provides: bundled(python3dist(setuptools)) = 36.8.0
|
| |
- Provides: bundled(python3dist(setuptools)) = 39.1.0
|
| |
- Provides: bundled(python3dist(wheel)) = 0.29.0
|
| |
- Provides: bundled(python3dist(wheel)) = 0.31.1
|
| |
+ # RPM installed wheels
|
| |
+ Requires: python-pip-wheel
|
| |
+ Requires: python-setuptools-wheel
|
| |
+ Requires: python-wheel-wheel
|
| |
|
| |
%description -n python3-virtualenv
|
| |
virtualenv is a tool to create isolated Python environments. virtualenv
|
| |
@@ -99,10 +118,35 @@
|
| |
%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
|
| |
|
| |
+ # Remove the wheels provided by RPM packages
|
| |
+ # Those are the "recent" version shipped with virtualenv 16.0.0
|
| |
+ rm virtualenv_support/pip-10.*
|
| |
+ rm virtualenv_support/setuptools-39.*
|
| |
+ rm virtualenv_support/wheel-0.31.*
|
| |
+
|
| |
+ # make sure we only left what was intended (old argparse, pip, setuptools, wheel)
|
| |
+ ls virtualenv_support/*.whl
|
| |
+ test $(ls virtualenv_support/*.whl -1 | wc -l) -eq 4
|
| |
|
| |
%build
|
| |
# Build code
|
| |
@@ -139,11 +183,18 @@
|
| |
%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
|
| |
@@ -156,14 +207,23 @@
|
| |
%{_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
|
| |
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Wed Aug 15 2018 Miro Hrončok <mhroncok@redhat.com> - 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 <mhroncok@redhat.com> - 16.0.0-4
|
| |
- Reintroduce support for Python 2.6 (#1602347)
|
| |
- Add missing bundled provides
|
| |
At least for Python > 2.6
Only available at Fedora 29+.