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