-
Notifications
You must be signed in to change notification settings - Fork 410
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
add get-pipx script #849
add get-pipx script #849
Conversation
b4abc6c
to
adc9598
Compare
4d23b29
to
f5a534e
Compare
f5a534e
to
9bba57b
Compare
README.md
Outdated
@@ -302,3 +319,7 @@ pipx is maintained by a team of volunteers (in alphabetical order) | |||
Issues and Pull Requests are definitely welcome! Check out [Contributing](https://pypa.github.io/pipx/contributing/) to get started. | |||
Everyone who interacts with the pipx project via codebase, issue tracker, chat rooms, or otherwise is expected to follow | |||
the [PSF Code of Conduct](https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md). | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty code block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, not sure how that got in there.
9bba57b
to
63ecb86
Compare
63ecb86
to
d6f4a90
Compare
``` | ||
|
||
pipx install PACKAGE | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added empty lines seem unnecessary?
|
||
> pycowsay mooo | ||
|
||
--- | ||
|
||
# < mooo > | ||
|
||
\ | ||
\ | ||
^**^ | ||
(oo)\_\_\_\_\_** | ||
(\_\_)\ )\/\ | ||
||----w | | ||
|| || | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASCII is broken
Generally looks good but the there seems to be some issues in documentation formatting. |
I am a little conflicted on adding this script. Another alternative I'm considering is building a pex and allowing users to just download and run it. It makes this script unnecessary. Thoughts? |
Hmm, distributing a pex sounds nice, but do we need to do something to specify the default interpreter pipx uses if we do that? |
Kind of, the pex can be told to use a shell script to find the right python interpreter from a list. Whichever one ends up matching is the one that pipx uses, which is also the python executable associated with a pipx-installed app unless the The
So if I do
we get
I'm trying to figure out how to tell it to specify minimum versions (i.e. not use python2.7 in that list). The Would this approach work for windows too? I'm guessing not since windows doesn't have a posix shell. |
I guess Output of
|
The interpreter check seems to work for me as well. When I make a requirement and then remove the path to my latest interpreters from my shell, it correctly tells me that I have a python but not the right one. But I can't find the mechanism (!!) The only thing I can think of is that the info is obscured somewhere below the shell script in the zipped data. This is the command I used, referring directly to our entrypoint location, not sure if there are any benefits one way or another:
I really like the idea of generating what looks like a "pipx binary" for POSIX folks to easily put in a system PATH location. I've always been dissatisfied with our install process on linux especially (i.e. without homebrew to install). |
One slight annoyance is that now we generate a |
Seems stalled, closing until more contribution when we can reopen. |
docs/changelog.md
Currently, pipx is commonly installed with
pip install pipx --user
, which installs into the user's site packages, rather than a virtual environment. This is a little ironic since the whole point of pipx is to not install everything into a single global environment. pipx makes an exception for itself here, but it's a little hypocritical. I would like to improve on this.This PR adds a new installer script that installs pipx with itself: it creates a temporary dir, creates a venv in there, installs pipx to the temp venv, then installs pipx with pipx, then deletes the temporary venv..
Summary of changes
Test plan
Tested by running
fixes #338
fyi @mattsb42-meta