-
-
Notifications
You must be signed in to change notification settings - Fork 626
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
A PexRequest
should support pex -c
.
#11583
Comments
This seems especially important because we generally allow users to change versions of tool libraries. Most of the time thats coupled with the ability to change entry point functions but its not in a few cases. Regardless, binding to a console script should make this moot across tool versions since any tool author changing their console script names has broken their brand and their users. Highly unlikely esp vs. moving around code. |
Introduce `MainSpecification` which can either be an `EntryPoint` or a `ConsoleScript`. Both `PexRequest` and `PexFromTargetsRequest` are updated to take a `MainSpecification` as is `PythonToolBase`. All internal rules are updated to use `ConsoleScript` where possible for improved stability of entry points across requirement upgrades. Fixes pantsbuild#11583 [ci skip-rust] [ci skip-build-wheels]
Introduce `MainSpecification` which can either be an `EntryPoint` or a `ConsoleScript`. Both `PexRequest` and `PexFromTargetsRequest` are updated to take a `MainSpecification` as is `PythonToolBase`. All internal rules are updated to use `ConsoleScript` where possible for improved stability of entry points across requirement upgrades. Fixes #11583
Right now, it only supports specifying modules or entry point functions:
pants/src/python/pants/backend/python/util_rules/pex.py
Lines 357 to 358 in c9d6826
pants/src/python/pants/backend/python/util_rules/pex.py
Lines 550 to 551 in c9d6826
Of the three options for specifying a main this only allows for the worst two in terms of stability. Since Pants uses Pex to package python tools (i.e.: binaries folks run like
pytest
orblack
), it should probably bind to those public names which are console scripts instead of modules (slightly less stable presumably) or entry point functions (clearly the least stable). Pex supports this with-c
.The text was updated successfully, but these errors were encountered: