|
|
c2c5bce |
From 01e27bd7a6ddde4db6654ab2f18def36dab64329 Mon Sep 17 00:00:00 2001
|
|
|
c2c5bce |
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
|
|
c2c5bce |
Date: Fri, 12 Jul 2019 11:58:32 +0200
|
|
|
c2c5bce |
Subject: [PATCH] Also search the LICENSE file in lib64/pythonX.Y
|
|
|
c2c5bce |
|
|
|
c2c5bce |
Several Linux distributions including Gentoo, Fedora, openSUSE
|
|
|
c2c5bce |
put things in lib64/pythonX.Y instead of lib/pythonX.Y on 64bit
|
|
|
c2c5bce |
architectures (x86_64, aarch64, etc.).
|
|
|
c2c5bce |
|
|
|
c2c5bce |
This was already respected via the fix_lib64() function, however
|
|
|
c2c5bce |
when virtualenv was searching for Python LICENSE, it was not.
|
|
|
c2c5bce |
|
|
|
c2c5bce |
Now is the lib64/pythonX.Y patch searched as well and unlike fix_lib64()
|
|
|
c2c5bce |
no checks need to be made, as the patch are tested in sequence.
|
|
|
c2c5bce |
|
|
|
c2c5bce |
See https://github.com/pypa/virtualenv/issues/1352#issuecomment-510500384
|
|
|
c2c5bce |
---
|
|
|
c2c5bce |
virtualenv.py | 3 +++
|
|
|
c2c5bce |
1 file changed, 3 insertions(+)
|
|
|
c2c5bce |
|
|
|
c2c5bce |
diff --git a/virtualenv.py b/virtualenv.py
|
|
|
c2c5bce |
index 3ccbed6d..d4d5d304 100755
|
|
|
c2c5bce |
--- a/virtualenv.py
|
|
|
c2c5bce |
+++ b/virtualenv.py
|
|
|
c2c5bce |
@@ -1333,9 +1333,12 @@ def copy_required_files(src_dir, lib_dir, symlink):
|
|
|
c2c5bce |
|
|
|
c2c5bce |
def copy_license(prefix, dst_prefix, lib_dir, symlink):
|
|
|
c2c5bce |
"""Copy the license file so `license()` builtin works"""
|
|
|
c2c5bce |
+ lib64_dir = lib_dir.replace("lib", "lib64")
|
|
|
c2c5bce |
for license_path in (
|
|
|
c2c5bce |
# posix cpython
|
|
|
c2c5bce |
os.path.join(prefix, os.path.relpath(lib_dir, dst_prefix), "LICENSE.txt"),
|
|
|
c2c5bce |
+ # posix cpython installed in /usr/lib64
|
|
|
c2c5bce |
+ os.path.join(prefix, os.path.relpath(lib64_dir, dst_prefix), "LICENSE.txt"),
|
|
|
c2c5bce |
# windows cpython
|
|
|
c2c5bce |
os.path.join(prefix, "LICENSE.txt"),
|
|
|
c2c5bce |
# pypy
|