commit 220a0db647c08c722b2696a7c4d46c35ec0c0dcb
Author: Jan Palus <[email protected]>
Date:   Tue Jan 18 22:49:32 2022 +0100

    bring back lib <-> lib{64,x32} symlink; rel 2
    
    new virtualenv no longer creates lib64 symlink which causes issues
    primarily in mozilla tooling due to mismatch between arch specific lib
    dir in virtualenv and generic 'lib' returned by
    distutils.sysconfig.get_python_lib(). proper solution would be either:
    
    1. modify virtualenv not to prefer distutils from setuptools wheel
       (implications unknown)
    
    2. prepare patched setuptools wheel
       * patch distutils embedded in setuptools same way as we patch
         python3:
    +        if plat_specific or standard_lib or prefix != "/usr":
       * start creating setuptools wheel
       * point virtualenv to our custom wheel 
(https://virtualenv.pypa.io/en/20.13.0/user_guide.html#embed-wheels-for-distributions)

 multilib.patch         | 31 +++++++++++++++++++++++++++++++
 python-virtualenv.spec |  4 +++-
 2 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/python-virtualenv.spec b/python-virtualenv.spec
index 7594dc5..d359e3e 100644
--- a/python-virtualenv.spec
+++ b/python-virtualenv.spec
@@ -10,12 +10,13 @@ Summary:    Tool to create isolated Python environments
 Summary(pl.UTF-8):     Narzędzie do tworzenia oddzielonych środowisk Pythona
 Name:          python-virtualenv
 Version:       20.13.0
-Release:       1
+Release:       2
 License:       MIT
 Group:         Development/Languages
 #Source0Download: https://pypi.org/simple/virtualenv/
 Source0:       
https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
 # Source0-md5: 95176f0639dc033650f0f3f9fdff299e
+Patch0:                multilib.patch
 URL:           https://pypi.org/project/virtualenv/
 %if %{with python2}
 BuildRequires: python >= 1:2.7
@@ -124,6 +125,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..bddc71b
--- /dev/null
+++ b/multilib.patch
@@ -0,0 +1,31 @@
+--- 
virtualenv-20.13.0/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py.orig
 2022-01-02 16:54:28.000000000 +0100
++++ 
virtualenv-20.13.0/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py
      2022-01-18 22:37:40.976826916 +0100
+@@ -10,6 +10,8 @@
+ from ..api import ViaGlobalRefApi, ViaGlobalRefMeta
+ from .builtin_way import VirtualenvBuiltin
+ 
++import os
++import sys
+ 
+ class BuiltinViaGlobalRefMeta(ViaGlobalRefMeta):
+     def __init__(self):
+@@ -82,6 +83,7 @@
+                 dirs.remove(directory)
+         for directory in sorted(dirs):
+             ensure_dir(directory)
++        self.symlink_libdir()
+ 
+         self.set_pyenv_cfg()
+         self.pyenv_cfg.write()
+@@ -112,3 +114,11 @@
+         self.pyenv_cfg["base-prefix"] = self.interpreter.system_prefix
+         self.pyenv_cfg["base-exec-prefix"] = 
self.interpreter.system_exec_prefix
+         self.pyenv_cfg["base-executable"] = self.interpreter.system_executable
++
++    def symlink_libdir(self):
++        lib_arch = None
++        for lib in [ 'lib64', 'libx32']:
++            if any(lib in p for p in sys.path):
++                lib_arch = lib
++        if lib_arch and (self.dest / lib_arch).exists() and not (self.dest / 
'lib').exists():
++            os.symlink(lib_arch, str(self.dest / 'lib'))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-virtualenv.git/commitdiff/220a0db647c08c722b2696a7c4d46c35ec0c0dcb

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to