[packages/python-virtualenv] - fix paths on x32 - rel 2
baggins
baggins at pld-linux.org
Tue Oct 18 22:50:11 CEST 2016
commit c325651652162fb84722912081b49aaf5a2465ef
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Oct 18 22:49:57 2016 +0200
- fix paths on x32
- rel 2
multilib.patch | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++
python-virtualenv.spec | 4 ++-
2 files changed, 69 insertions(+), 1 deletion(-)
---
diff --git a/python-virtualenv.spec b/python-virtualenv.spec
index 849972d..c99254f 100644
--- a/python-virtualenv.spec
+++ b/python-virtualenv.spec
@@ -9,12 +9,13 @@ Summary: Tool to create isolated Python environments
Summary(pl.UTF-8): Narzędzie do tworzenia oddzielonych środowisk Pythona
Name: python-virtualenv
Version: 15.0.1
-Release: 1
+Release: 2
License: MIT
Group: Development/Languages
#Source0Download: https://pypi.python.org/simple/virtualenv/
Source0: https://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
# Source0-md5: 28d76a0d9cbd5dc42046dd14e76a6ecc
+Patch0: multilib.patch
URL: https://pypi.python.org/pypi/virtualenv
%if %{with python2}
BuildRequires: python >= 1:2.6
@@ -96,6 +97,7 @@ Project. Zostało wydane na liberalnej licencji w stylu MIT.
%prep
%setup -q -n virtualenv-%{version}
+%patch0 -p1
%build
%if %{with python2}
diff --git a/multilib.patch b/multilib.patch
new file mode 100644
index 0000000..b33ab80
--- /dev/null
+++ b/multilib.patch
@@ -0,0 +1,66 @@
+--- virtualenv-15.0.1/virtualenv.py~ 2016-03-17 16:16:07.000000000 +0100
++++ virtualenv-15.0.1/virtualenv.py 2016-10-18 22:48:47.174956732 +0200
+@@ -1094,7 +1094,7 @@
+ else:
+ prefix = sys.prefix
+ mkdir(lib_dir)
+- fix_lib64(lib_dir, symlink)
++ fix_libarch(lib_dir, symlink)
+ stdlib_dirs = [os.path.dirname(os.__file__)]
+ if is_win:
+ stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs'))
+@@ -1498,7 +1498,7 @@
+ copyfile(os.path.abspath(os.path.join(home_dir, subdir_name)), \
+ os.path.join(local_path, subdir_name), symlink)
+
+-def fix_lib64(lib_dir, symlink=True):
++def fix_libarch(lib_dir, symlink=True):
+ """
+ Some platforms (particularly Gentoo on x64) put things in lib64/pythonX.Y
+ instead of lib/pythonX.Y. If this is such a platform we'll just create a
+@@ -1507,29 +1507,37 @@
+ # PyPy's library path scheme is not affected by this.
+ # Return early or we will die on the following assert.
+ if is_pypy:
+- logger.debug('PyPy detected, skipping lib64 symlinking')
++ logger.debug('PyPy detected, skipping lib64/libx32 symlinking')
+ return
+- # Check we have a lib64 library path
+- if not [p for p in distutils.sysconfig.get_config_vars().values()
++ lib_arch = None
++ # Check we have a lib64 or libx32 library path
++ if [p for p in distutils.sysconfig.get_config_vars().values()
++ if isinstance(p, basestring) and 'libx32' in p]:
++ lib_arch = 'libx32'
++
++ if [p for p in distutils.sysconfig.get_config_vars().values()
+ if isinstance(p, basestring) and 'lib64' in p]:
++ lib_arch = 'lib64'
++
++ if not lib_arch:
+ return
+
+- logger.debug('This system uses lib64; symlinking lib64 to lib')
++ logger.debug('This system uses %s; symlinking %s to lib', lib_arch, lib_arch)
+
+ assert os.path.basename(lib_dir) == 'python%s' % sys.version[:3], (
+ "Unexpected python lib dir: %r" % lib_dir)
+ lib_parent = os.path.dirname(lib_dir)
+ top_level = os.path.dirname(lib_parent)
+ lib_dir = os.path.join(top_level, 'lib')
+- lib64_link = os.path.join(top_level, 'lib64')
++ libarch_link = os.path.join(top_level, lib_arch)
+ assert os.path.basename(lib_parent) == 'lib', (
+ "Unexpected parent dir: %r" % lib_parent)
+- if os.path.lexists(lib64_link):
++ if os.path.lexists(libarch_link):
+ return
+ if symlink:
+- os.symlink('lib', lib64_link)
++ os.symlink('lib', libarch_link)
+ else:
+- copyfile('lib', lib64_link)
++ copyfile('lib', libarch_link)
+
+ def resolve_interpreter(exe):
+ """
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-virtualenv.git/commitdiff/c325651652162fb84722912081b49aaf5a2465ef
More information about the pld-cvs-commit
mailing list