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

Fix pyoxidizer_binary to support python_distribution targets that depend on others (Cherry-pick of #14620) #14626

Merged
merged 1 commit into from Feb 25, 2022

Conversation

Eric-Arellano
Copy link
Contributor

It's very common for one python_distribution to depend on another, e.g. pantsbuild.pants.testutil depends on pantsbuild.pants. We can easily support that by having the user specify all necessary python_distribution targets in the dependencies field.

A fancier implementation would calculate for you automatically what dists a python_distribution depends on. But that's more complex than it sounds! Note that the dependency is not expressed explicitly via the dependencies field, but instead via very complex logic in setup_py.py; we'd need to leak that implementation here, or scan the generated install_requires. Pants's support for PEP 517 also makes things complicated. So, instead, for now at least, we go with the simple workaround.

[ci skip-rust]
[ci skip-build-wheels]

… depend on others (pantsbuild#14620)

It's very common for one `python_distribution` to depend on another, e.g. `pantsbuild.pants.testutil` depends on `pantsbuild.pants`. We can easily support that by having the user specify all necessary `python_distribution` targets in the `dependencies` field.

A fancier implementation would calculate for you automatically what dists a `python_distribution` depends on. But that's more complex than it sounds! Note that the dependency is not expressed explicitly via the `dependencies` field, but instead via very complex logic in `setup_py.py`; we'd need to leak that implementation here, or scan the generated `install_requires`. Pants's support for PEP 517 also makes things complicated. So, instead, for now at least, we go with the simple workaround.

[ci skip-rust]
[ci skip-build-wheels]
@stuhood stuhood enabled auto-merge (squash) February 25, 2022 23:14
@stuhood stuhood merged commit ec3204d into pantsbuild:2.10.x Feb 25, 2022
@Eric-Arellano Eric-Arellano deleted the cp-pyoxy-mult branch February 26, 2022 00:02
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.

None yet

2 participants