What would it take to have an environment-aware ta...
# plugins
f
What would it take to have an environment-aware target that can consume a python sdist like a requirement and produce a wheel for it? Right now
python_distribution
doesn't support environments, and it treats 3rd party requirements as inputs to generating
install_requires=
. What I'm thinking of is a putative
python__re_distribution
target that could build an sdist into a wheel in the given environment.
So the code that turns a python distribution into a built package is here https://github.com/pantsbuild/pants/blob/8edb8e94d573b86de0e11563f9f1886342536e48/src/python/pants/backend/python/goals/package_dists.py#L18 We'd need to do something similar to that but add environment-awareness, and probably define the target such that it doesn't allow first-party sources, and only rebuilds
python_requirement
targets