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

pipx run compatible entrypoint #1397

Open
henryiii opened this issue May 14, 2021 · 3 comments
Open

pipx run compatible entrypoint #1397

henryiii opened this issue May 14, 2021 · 3 comments
Assignees
Labels
cli Related to command line interface things enhancement Improvements to functionality

Comments

@henryiii
Copy link

henryiii commented May 14, 2021

What's the problem this feature will solve?

Improve support for pipx run. Currently, you have to use --spec to to use pipx run, because pip-tools does not contain an executable called pip-tools.

Describe the solution you'd like

Two possibilities:

  1. Add pip-tools as a console-script entry point to __main__:cli. Then python -m pip-tools compile could be written as pip-tools compile, and pipx run would be happy.
  2. Add a pipx.run entrypoint. The nice thing about this is you could disable pipx run pip-tools sync until sync support is finished (Support for installation via pipx #1087) by providing a modified cli as the entrypoint. Maybe it could even support sync by selecting the correct python?

pipx run is a 'temporary' version of pipx install, which works well for just using what you need when you need it. pipx built-in support might be coming to manylinux soon, which could be a very handy way to run pip-compile.

@ssbarnea
Copy link
Member

ssbarnea commented Jun 11, 2021

@henryiii Just make a PR! I am also using pipx myself. Any approach seems reasonable to me.

@henryiii
Copy link
Author

Still planning to do this; will need to play around to decide on how to handle "sync".

@atugushev atugushev added cli Related to command line interface things enhancement Improvements to functionality labels Jul 17, 2021
@AndydeCleyre
Copy link
Contributor

AndydeCleyre commented Mar 21, 2022

FWIW, zpy's pip-tools-based pipx clone, pipz, always requires the pkgspec when using the analogous subcommand, runpkg, and so the syntax is, in the case where you need --spec for pipx, very slightly shorter:

$ pipz runpkg pip-tools pip-compile
$ pipz runpkg 'pip-tools @ git+https://github.com/atugushev/pip-tools@new-resolver' pip-compile --resolver backtracking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to command line interface things enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

4 participants