From f19b851a67caf89bb5b6e3483ab648c6eb96547b831ed016996d4615be20e5f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 20 Jul 2018 18:20:22 +0000 Subject: [PATCH 1/3] Accepting request 624311 from home:mwilck:branches:devel:languages:python - Fix failure of virtualenv --always-copy (bsc#1102096) OBS-URL: https://build.opensuse.org/request/show/624311 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=59 --- pypa-virtualenv-1189.patch | 26 ++++++++++++++++++++++++++ python-virtualenv.changes | 5 +++++ python-virtualenv.spec | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 pypa-virtualenv-1189.patch diff --git a/pypa-virtualenv-1189.patch b/pypa-virtualenv-1189.patch new file mode 100644 index 0000000..b022337 --- /dev/null +++ b/pypa-virtualenv-1189.patch @@ -0,0 +1,26 @@ +From 786675a83f494202cb9522d57a98e5ddc0d7405e Mon Sep 17 00:00:00 2001 +From: Ashley Whetter +Date: Tue, 3 Jul 2018 10:48:19 -0700 +Subject: [PATCH] Fixed failure to copy on platforms that use lib64 + +The current behaviour attempts to copy a "lib" folder from the current directory, +instead of copying the "lib" folder inside the virtualenv. Therefore the copying would fail. +This fixes that by always copying the "lib" folder from the virtualenv. + +--- + virtualenv.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/virtualenv.py b/virtualenv.py +index c008a395..34c2f6a1 100755 +--- a/virtualenv.py ++++ b/virtualenv.py +@@ -1559,7 +1559,7 @@ def fix_lib64(lib_dir, symlink=True): + if symlink: + os.symlink('lib', lib64_link) + else: +- copyfile('lib', lib64_link) ++ copyfile(lib_dir, lib64_link) + + def resolve_interpreter(exe): + """ diff --git a/python-virtualenv.changes b/python-virtualenv.changes index dff9931..75c69b0 100644 --- a/python-virtualenv.changes +++ b/python-virtualenv.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 20 16:29:52 UTC 2018 - mwilck@suse.com + +- Fix failure of virtualenv --always-copy (bsc#1102096) + ------------------------------------------------------------------- Wed Feb 21 08:13:12 UTC 2018 - tbechtold@suse.com diff --git a/python-virtualenv.spec b/python-virtualenv.spec index 18e6c3f..97a5840 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -25,6 +25,7 @@ Summary: Virtual Python Environment builder License: MIT Group: Development/Languages/Python Source: https://pypi.io/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz +Patch01: pypa-virtualenv-1189.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} @@ -60,6 +61,7 @@ libraries either). %prep %setup -q -n virtualenv-%{version} +%patch01 -p1 %build %python_build From b82e1fa9b124242ff72396ae45fec8ef707542c3676f8feca657277352537cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sun, 22 Jul 2018 10:06:29 +0000 Subject: [PATCH 2/3] - Fix failure of virtualenv --always-copy (bsc#1102096): * pypa-virtualenv-1189.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=60 --- python-virtualenv.changes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-virtualenv.changes b/python-virtualenv.changes index 75c69b0..0780858 100644 --- a/python-virtualenv.changes +++ b/python-virtualenv.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- Fri Jul 20 16:29:52 UTC 2018 - mwilck@suse.com -- Fix failure of virtualenv --always-copy (bsc#1102096) +- Fix failure of virtualenv --always-copy (bsc#1102096): + * pypa-virtualenv-1189.patch ------------------------------------------------------------------- Wed Feb 21 08:13:12 UTC 2018 - tbechtold@suse.com From 26031a2e229f57eb252e34fcceadd3e7d590f6630ce0f6efbda1c653c437be8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sun, 22 Jul 2018 10:26:39 +0000 Subject: [PATCH 3/3] - Enable tests, skip upstream failing one OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=61 --- python-virtualenv.changes | 5 +++++ python-virtualenv.spec | 21 ++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/python-virtualenv.changes b/python-virtualenv.changes index 0780858..cdeb25a 100644 --- a/python-virtualenv.changes +++ b/python-virtualenv.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jul 22 10:26:27 UTC 2018 - tchvatal@suse.com + +- Enable tests, skip upstream failing one + ------------------------------------------------------------------- Fri Jul 20 16:29:52 UTC 2018 - mwilck@suse.com diff --git a/python-virtualenv.spec b/python-virtualenv.spec index 97a5840..eb38c28 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -20,21 +20,20 @@ Name: python-virtualenv Version: 15.1.0 Release: 0 -Url: http://www.virtualenv.org/ Summary: Virtual Python Environment builder License: MIT Group: Development/Languages/Python -Source: https://pypi.io/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz +URL: http://www.virtualenv.org/ +Source: https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz Patch01: pypa-virtualenv-1189.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: %{python_module devel} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros Requires: python Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch - %python_subpackages %description @@ -43,7 +42,7 @@ The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2. How can you use both these applications? If you install everything into -/usr/lib/python2.4/site-packages (or whatever your platforms standard location +%{_libexecdir}/python2.4/site-packages (or whatever your platforms standard location is), its easy to end up in a situation where you unintentionally upgrade an application that shouldnt be upgraded. @@ -70,15 +69,19 @@ libraries either). %python_install %python_clone -a %{buildroot}%{_bindir}/virtualenv +%check +# test broken upstream https://github.com/pypa/virtualenv/issues/530 +%python_expand py.test-%{$python_bin_suffix} -k 'not test_always_copy_option' -vv + %post %python_install_alternative virtualenv %postun %python_uninstall_alternative virtualenv -%files %python_files -%defattr(-,root,root,-) -%doc LICENSE.txt README.rst +%files %{python_files} +%license LICENSE.txt +%doc README.rst %{python_sitelib}/virtualenv* %python_alternative %{_bindir}/virtualenv %pycache_only %{python_sitelib}/__pycache__