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

PythonInterpreter: support python binary names with single letter suffixes #769

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

murph
Copy link
Contributor

@murph murph commented Sep 30, 2019

On gentoo linux, my python binaries have the 'm' suffix, and then are symlinked from the non-suffixed versions:

usr/bin/python3.5 -> python3.5m
/usr/bin/python3.5m
/usr/bin/python3.6 -> python3.6m
/usr/bin/python3.6m
etc.

PEP-3149 indicates this is okay, so pex should probably support it.

I updated a test, but already have a bunch of tox failures on master so it's hard to know if it passes:
"15 failed, 61 passed, 3 skipped, 1 xfailed in 198.12 seconds"

I'll dig into that in another branch hopefully =)

Copy link
Member

@jsirois jsirois left a comment

Choose a reason for hiding this comment

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

LGTM, but I'd like your thoughts on my comment and maybe a file comment change if you agree.

@@ -267,6 +267,10 @@ class PythonInterpreter(object):

re.compile(r'python[23]$'),
re.compile(r'python[23].[0-9]$'),

# PEP-3149: Python implementations MAY include additional flags in the file name tag
re.compile(r'python[23].[0-9][a-z]$'),
Copy link
Member

@jsirois jsirois Oct 2, 2019

Choose a reason for hiding this comment

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

You've found cases of this in the wild and that may be more important to mention since, IIUC, that pep refers to .so names and not python interpreter names.

@murph murph closed this Oct 4, 2019
@murph murph reopened this Oct 4, 2019
Copy link
Member

@jsirois jsirois left a comment

Choose a reason for hiding this comment

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

Thanks!

@jsirois jsirois merged commit 0681aaa into pex-tool:master Oct 16, 2019
@jsirois jsirois mentioned this pull request Oct 16, 2019
2 tasks
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.

2 participants