diff --git a/.gitignore b/.gitignore index ad71f8f..3674286 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/virtualenv-1.10.1.tar.gz +SOURCES/virtualenv-15.1.0.tar.gz diff --git a/.python-virtualenv.metadata b/.python-virtualenv.metadata index 14816cf..dbe103b 100644 --- a/.python-virtualenv.metadata +++ b/.python-virtualenv.metadata @@ -1 +1 @@ -0c441553f97a1ed68bb2032c9ab65e6c3bc38e24 SOURCES/virtualenv-1.10.1.tar.gz +995ce0fa007210ac2f10258999d06813ecdd6eeb SOURCES/virtualenv-15.1.0.tar.gz diff --git a/SOURCES/disable-pypi-downloads-on-venv-creation.patch b/SOURCES/disable-pypi-downloads-on-venv-creation.patch new file mode 100644 index 0000000..6871195 --- /dev/null +++ b/SOURCES/disable-pypi-downloads-on-venv-creation.patch @@ -0,0 +1,12 @@ +diff --git a/virtualenv.py b/virtualenv.py +index d1a344a..1d46506 100755 +--- a/virtualenv.py ++++ b/virtualenv.py +@@ -613,7 +613,6 @@ def main(): + parser.add_option( + "--download", + dest="download", +- default=True, + action="store_true", + help="Download preinstalled packages from PyPI.", + ) diff --git a/SOURCES/fix-python34-compatibility.patch b/SOURCES/fix-python34-compatibility.patch deleted file mode 100644 index f8df498..0000000 --- a/SOURCES/fix-python34-compatibility.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/virtualenv.py b/virtualenv.py -index 4ec3961..8886fc6 100755 ---- a/virtualenv.py -+++ b/virtualenv.py -@@ -130,7 +130,7 @@ elif majver == 3: - 'reprlib']) - if minver >= 2: - REQUIRED_FILES[-1] = 'config-%s' % majver -- if minver == 3: -+ if minver >= 3: - import sysconfig - platdir = sysconfig.get_config_var('PLATDIR') - REQUIRED_FILES.append(platdir) -@@ -285,6 +285,8 @@ elif majver == 3: - #"xmlrpc", - #"zipfile", - ]) -+if minver >= 4: -+ REQUIRED_MODULES.extend(['operator', '_collections_abc']) - - if is_pypy: - # these are needed to correctly display the exceptions that may happen diff --git a/SOURCES/polish-error-msg-when-file-is-passed.patch b/SOURCES/polish-error-msg-when-file-is-passed.patch deleted file mode 100644 index 9f7f4d4..0000000 --- a/SOURCES/polish-error-msg-when-file-is-passed.patch +++ /dev/null @@ -1,18 +0,0 @@ -@@ -, +, @@ ---- - virtualenv.py | 4 ++++ - 1 file changed, 4 insertions(+) ---- a/virtualenv.py -+++ a/virtualenv.py -@@ -791,6 +791,10 @@ def main(): - sys.exit(2) - - home_dir = args[0] -+ if os.path.exists(home_dir) and os.path.isfile(home_dir): -+ logger.fatal('ERROR: File already exists and is not a directory.') -+ logger.fatal('Please provide a different path or delete the file.') -+ sys.exit(3) - - if os.environ.get('WORKING_ENV'): - logger.fatal('ERROR: you cannot run virtualenv while in a workingenv') --- diff --git a/SPECS/python-virtualenv.spec b/SPECS/python-virtualenv.spec index c42b6d3..f330b53 100644 --- a/SPECS/python-virtualenv.spec +++ b/SPECS/python-virtualenv.spec @@ -2,30 +2,29 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: python-virtualenv -Version: 1.10.1 -Release: 4%{?dist} +Version: 15.1.0 +Release: 2%{?dist} Summary: Tool to create isolated Python environments Group: Development/Languages License: MIT -URL: http://pypi.python.org/pypi/virtualenv -Source0: http://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz -# Patch that shows a custom error message when a FILE passed to virtualenv -# to be used as 'home dir' already exists and is NOT a directory. -# rhbz#1306513 -Patch0: polish-error-msg-when-file-is-passed.patch -# Make virtualenv compatible with Python 3.4 -# Fixed upstream: -# https://github.com/pypa/virtualenv/commit/8ce3fcf153dd71c0e7f317161eefe2f6e7215ff0 -# https://github.com/pypa/virtualenv/commit/232ab405ab72bbb6b4032eb555dc4aa0a00c94f3 -# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1411685 -Patch1: fix-python34-compatibility.patch +URL: https://pypi.python.org/pypi/virtualenv +Source0: https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz + +# Disable downloading pip, wheel and setuptools from pypi +# automatically when creating a new venv. +# Upstream commit that was reverted: +# https://github.com/pypa/virtualenv/commit/3d7361ff2e31472cb69d00150fbdf5a3c9af2a0d +Patch0: disable-pypi-downloads-on-venv-creation.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python2-devel Requires: python-setuptools, python2-devel +Provides: python2-virtualenv = %{version}-%{release} + %if 0%{?fedora} BuildRequires: python-sphinx %endif @@ -41,7 +40,6 @@ licensed under an MIT-style permissive license. %prep %setup -q -n virtualenv-%{version} %patch0 -p1 -%patch1 -p1 %{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py @@ -60,6 +58,10 @@ rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT rm -f build/sphinx/html/.buildinfo +# The versioned 2.x script was removed from upstream. Add it back. +cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-%{python2_version} +cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2 + %clean rm -rf $RPM_BUILD_ROOT @@ -78,6 +80,15 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Sep 13 2017 Charalampos Stratakis - 15.1.0-2 +- Add back the versioned virtualenv script +Resolves: rhbz#1461154 + +* Wed Sep 13 2017 Charalampos Stratakis - 15.1.0-1 +- Rebase to version 15.1.0 +- Disable automatic downloads from pypi on new venv creation +Resolves: rhbz#1461154 + * Wed Feb 08 2017 Charalampos Stratakis - 1.10.1-4 - Fix Python 3.4 compatibility Resolves: rhbz#1411685