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

Address package conflict case in BuildLocalPythonDistributions backend task #5300

Closed
CMLivingston opened this issue Jan 9, 2018 · 0 comments

Comments

@CMLivingston
Copy link
Contributor

This is a continuation of the work from #5141.

The BuildLocalPythonDistributions backend task enables users to define a python_dist target and pass in a setup.py that the task will run. This allows them to build wheels from Python packages that may also contain C/C++ extensions and compose them into their BUILD targets.

A potential issue in the current implementation is that there is no treatment for resolving the transitive dependencies of a user-supplied setup.py listed in setup() fields such as install_requires and setup_requires. There is also the issue of if a user wishes to package a python dist that has the same name as a dependency listed on the consuming target. This could cause the pex to break in subtle ways if the consuming target has a dependency of the same name but different version.

The scope of this ticket is to address these issues by extracting transitive dependencies from a user-defined setup.py and injecting them into the pex resolver used by the resolve_requirements backend task. The issue of user-defined package names colliding with dependencies on the consuming target can be solved by reading the name of the wheel built by the BuildLocalPythonDistributions backend task, extracting the package name and version from this metadata, and passing it to the pex resolver alongside the transitive dependencies extracted from the setup.py file supplied by the user.

@CMLivingston CMLivingston changed the title Address package conflict case in Python Distribution backend task Address package conflict case in BuildLocalPythonDistributions backend task Jan 9, 2018
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

No branches or pull requests

2 participants