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

Use extended platform specification for current platform in resolve_multi. #6099

Closed
wants to merge 1 commit into from

Conversation

kwlzn
Copy link
Member

@kwlzn kwlzn commented Jul 11, 2018

Improves ABI selection for resolved dists to avoid cases like e.g.

Exception message: /home/travis/.pex/install/cffi-1.11.1-cp27-cp27m-manylinux1_x86_64.whl.c29d7079f1a3cf615b80ce0420ced57c9facc7b1/cffi-1.11.1-cp27-cp27m-manylinux1_x86_64.whl/_cffi_backend.so: undefined symbol: PyUnicodeUCS2_FromUnicode

where the platform=current ABI type is cp27mu vs cp27m.

Copy link
Sponsor Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Thanks.

@@ -32,3 +32,13 @@ def get_local_platform():
# is fixed.
current_platform = Platform.current()
return current_platform.platform


def get_extended_local_platform():
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Worth memoizing?

Copy link
Member Author

Choose a reason for hiding this comment

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

haven't profiled it, but I suspect not.

@jsirois
Copy link
Contributor

jsirois commented Jul 11, 2018

I don't think this is right either. The fundamental problem right now is, given an interpreter and no platform, the pex resolve method chooses Platform.current() instead of the platform of the given interpreter (which there is no sane public way to calculate with the pex API as is today - a wart from the initual manylinux PR).

As an aside, pex understands 'current', so this PR could be replaced by just passing platform=platform.

Either way, this should fail in CI unless I was hallucinating when I upgraded us to 1.4.4, which required the truncated platform workaround.

@jsirois
Copy link
Contributor

jsirois commented Jul 11, 2018

Clearly? the truncation workaround is broken but it specifically targeted this logic:
https://github.com/pantsbuild/pex/blob/master/pex/platforms.py#L72-L81

@kwlzn
Copy link
Member Author

kwlzn commented Jul 12, 2018

discussed in Slack, but will discard this in favor of John's current PythonIdentity tack.

@kwlzn kwlzn closed this Jul 12, 2018
@jsirois
Copy link
Contributor

jsirois commented Jul 12, 2018

Resurrected this PR in simpler form in #6104. We'll see how CI goes. If ok - the rest of the pex work and re-consumption in Pants can happen without blocking broken builds over here in Pants land.

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