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
I'm seeking guidance on configuring pyproject.toml to conditionally install specific command-line scripts based on the installation context. In my project, I have several scripts defined under [tool.poetry.scripts]:
When installing the package using pipx, all these commands become globally available. However, I intend for only the dbk command to be accessible in this context, while the other commands should remain available for development and continuous integration (CI) environments.
I understand that Poetry currently installs all scripts specified in [tool.poetry.scripts] without conditional inclusion. Is there an existing method or a recommended best practice to achieve this selective script installation? If not, would it be feasible to consider implementing a feature that allows for conditional script installation based on extras or environment markers?
This functionality would enhance the flexibility of package installations, ensuring that end-users receive only the necessary command-line tools, while developers and CI pipelines retain access to the full suite of scripts.
I appreciate any insights or suggestions the community can provide on this matter.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm seeking guidance on configuring
pyproject.toml
to conditionally install specific command-line scripts based on the installation context. In my project, I have several scripts defined under[tool.poetry.scripts]
:When installing the package using
pipx
, all these commands become globally available. However, I intend for only thedbk
command to be accessible in this context, while the other commands should remain available for development and continuous integration (CI) environments.I understand that Poetry currently installs all scripts specified in
[tool.poetry.scripts]
without conditional inclusion. Is there an existing method or a recommended best practice to achieve this selective script installation? If not, would it be feasible to consider implementing a feature that allows for conditional script installation based on extras or environment markers?This functionality would enhance the flexibility of package installations, ensuring that end-users receive only the necessary command-line tools, while developers and CI pipelines retain access to the full suite of scripts.
I appreciate any insights or suggestions the community can provide on this matter.
Beta Was this translation helpful? Give feedback.
All reactions