Making spec the argument of install
See original GitHub issueIn https://github.com/pipxproject/pipx/issues/144, @raxod502 mentioned
I am quite confused why the package name I give pipx wouldn’t normally be passed to pip install. I don’t see any explanation of what the alternative is.
Why do we separately specify the package name and the requirement-specifier? For example, the API I wonder about is just copying pip’s interface:
$ pip install --help
Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
The advantages are:
- A distribution name can be specified, or a url or a path.
- Any number of requirements can be specified.
- I don’t have to learn a new syntax, I can just use pip’s which I already know.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:24 (16 by maintainers)
Top Results From Across the Web
Making spec the argument of install · Issue #147 · pypa/pipx
I believe it is because pipx needs to make a virtualenv based on the package name, which is not always clear from the...
Read more >Using Spec Files — PyInstaller 5.7.0 documentation
In the spec file, make a list of tuples that describe the files needed. Assign the list of tuples to the binaries= argument...
Read more >pip install - pip documentation v22.3.1
Argument Handling# ... When looking at the items to be installed, pip checks what type of item each is, in the following order:...
Read more >SPEC CPU®2017 Frequently Asked Questions
05 Why does installation fail on macOS with messages claiming that the software "cannot be opened because the developer cannot be verified"?
Read more >Passing user defined argument to RPM is possible while ...
Now when you install the RPM, you can specify a different prefix. rpm -i sample.rpm --prefix /tmp. This will install the file in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And this can be faster than a regular install of the package, because it works by installing using the
--no-dependencies
option to pip. So for package name determination you would only wait just for the main package to install and not for any of its dependencies to install.Ok, but consider this: somebody is going to have to discover the package name. No reasonable user is going to realize to begin with that the package name is different from the Git repo name. So what’s going to happen is they will try to install it with pipx, hit this error, try using the Git repo as the package name after finding this issue, get another error when the package name doesn’t match, and then install a second time with the correct package name that they eventually figure out from looking on GitHub most likely. You still end up with two virtualenvs that were created, and it’s a heck of a lot slower because it’s the user doing the troubleshooting, instead of pipx. Why don’t we assume that the package name is the same as the Git repo, with a slower fallback, as part of the effort to discourage package authors from making poor packaging decisions?