]> git.pld-linux.org Git - packages/python-virtualenv.git/commitdiff
- fix paths on x32 auto/th/python-virtualenv-15.0.1-2
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 18 Oct 2016 20:49:57 +0000 (22:49 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 18 Oct 2016 20:49:57 +0000 (22:49 +0200)
- rel 2

multilib.patch [new file with mode: 0644]
python-virtualenv.spec

diff --git a/multilib.patch b/multilib.patch
new file mode 100644 (file)
index 0000000..b33ab80
--- /dev/null
@@ -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):
+     """
index 849972d4456fbb83bb89d07efd9cea5e6cb45455..c99254ff4f219687de9de3bcc9ccebd4e6606267 100644 (file)
@@ -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}
This page took 0.133056 seconds and 4 git commands to generate.