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

PEXBuilder does not respect interpreter when compiling source to bytecode #127

Closed
jsirois opened this issue Jun 12, 2015 · 1 comment
Closed
Assignees
Labels

Comments

@jsirois
Copy link
Member

jsirois commented Jun 12, 2015

Today when calling add_source on a PEXBuilder, any '.py' files are byte code compiled using the current ambient interpreter and not the PythonInterpreter the PEXBuilder was constructed with: https://github.com/pantsbuild/pex/blob/v1.0.0/pex/pex_builder.py#L136

This leads to problems when the PEXBuilder is being used in an interpeter that has language incompatibilites with the target interpreter; ie: when running under 2.7 and trying to contruct a pex targeted to 3.4 using python 3 only language features. An example of this is outlined in pantsbuild/pants#1658

@jsirois
Copy link
Member Author

jsirois commented Jul 3, 2015

Fix submitted @ ac3c7f1

@jsirois jsirois closed this as completed Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant