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

Updates interpreter path parsing to handle Jenkins #192

Closed

Conversation

daveFNbuck
Copy link
Contributor

When building a pex on Jenkins inside an auto-generated virtualenv, I keep ending up with interpreter names like CPython-2.7.3.tmp.ba3a2c39daab46ef978ba07fe335079d. If we simply split on dots to get version number, we'll end up with an invalid version number. To avoid this, we now just take the first 3 items when splitting on a dot. This allows pex building for me on Jenkins.

When building a pex on Jenkins inside an auto-generated virtualenv, I
keep ending up with interpreter names like
CPython-2.7.3.tmp.ba3a2c39daab46ef978ba07fe335079d. If we simply split
on dots to get version number, we'll end up with an invalid version
number. To avoid this, we now just take the first 3 items when splitting
on a dot. This allows pex building for me on Jenkins.
@@ -95,7 +95,7 @@ def from_id_string(cls, id_string):
@classmethod
def from_path(cls, dirname):
interp, version = dirname.split('-')
major, minor, patch = version.split('.')
major, minor, patch = version.split('.')[:3]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the larger question here is why the interpreter discovery mechanism is finding what it deems valid interpreters that look like 'CPython-2.7.3.tmp.ba3a2c39daab46ef978ba07fe335079d' or where they're coming from to begin with.

any clues from your analysis? here's what these should normally look like in cache:

$ find ~/.pex/interpreters
/Users/kw/.pex/interpreters
/Users/kw/.pex/interpreters/CPython-2.7.10
/Users/kw/.pex/interpreters/CPython-2.7.10/wheel
/Users/kw/.pex/interpreters/CPython-2.7.10/wheel-0.24.0-py2.7.egg
/Users/kw/.pex/interpreters/CPython-2.7.6
/Users/kw/.pex/interpreters/CPython-2.7.6/wheel
/Users/kw/.pex/interpreters/CPython-2.7.6/wheel-0.24.0-py2.7.egg

but in your interpreter cache, you'd probably find the *.tmp.* variety which is likely where this code is choking.

related:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that this happened because of the failure fixed in #191. I can't
replicate it on my laptop, so it's probably something weird with how my CI
generates temporary workspaces. With #191 applied I don't have this issue,
so I'm ok to close.

On Fri, Jan 1, 2016 at 11:57 AM, Kris Wilson [email protected]
wrote:

In pex/interpreter.py
#192 (comment):

@@ -95,7 +95,7 @@ def from_id_string(cls, id_string):
@classmethod
def from_path(cls, dirname):
interp, version = dirname.split('-')

  • major, minor, patch = version.split('.')
  • major, minor, patch = version.split('.')[:3]

I think the larger question here is why the interpreter discovery
mechanism is finding what it deems valid interpreters that look like
'CPython-2.7.3.tmp.ba3a2c39daab46ef978ba07fe335079d' or where they're
coming from to begin with.

any clues from your analysis? here's what these should normally look like
in cache:

$ find ~/.pex/interpreters
/Users/kw/.pex/interpreters
/Users/kw/.pex/interpreters/CPython-2.7.10
/Users/kw/.pex/interpreters/CPython-2.7.10/wheel
/Users/kw/.pex/interpreters/CPython-2.7.10/wheel-0.24.0-py2.7.egg
/Users/kw/.pex/interpreters/CPython-2.7.6
/Users/kw/.pex/interpreters/CPython-2.7.6/wheel
/Users/kw/.pex/interpreters/CPython-2.7.6/wheel-0.24.0-py2.7.egg

but in your interpreter cache, you'd probably find the .tmp. variety
which is likely where this code is choking.

related:


Reply to this email directly or view it on GitHub
https://github.com/pantsbuild/pex/pull/192/files#r48679975.

@daveFNbuck daveFNbuck closed this Jan 2, 2016
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