You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
CMLivingston
changed the title
Address package conflict case in Python Distribution backend task
Address package conflict case in BuildLocalPythonDistributions backend task
Jan 9, 2018
This is a continuation of the work from #5141.
The
BuildLocalPythonDistributions
backend task enables users to define apython_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
andsetup_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 theBuildLocalPythonDistributions
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.The text was updated successfully, but these errors were encountered: