Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also search the LICENSE file in lib64/pythonX.Y #1382

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Jul 12, 2019

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 #1352 (comment)

Thanks for contributing a pull request, see checklist all is good!

  • wrote descriptive pull request text
  • added/updated test(s) - covered by test_license_builtin - not sure how would I mock lib64 Python on non-lib64 Python to test this on other platforms
  • updated/extended the documentation (this functionality is not mentioned but in changelog)
  • added news fragment in docs/changelog folder

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 pypa#1352 (comment)
@@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, shouldn't this split and then join so it is only removing a segment named lib -- this'll potentially fail for /foolib/lib/python3.6 or some such

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants