pypa / pipx

Install and Run Python Applications in Isolated Environments
https://pipx.pypa.io
MIT License
10.48k stars 414 forks source link

create snap (linux) and scoop (windows) packages #338

Open AlJohri opened 4 years ago

AlJohri commented 4 years ago

How would this feature be useful? We have homebrew (which is slowly getting better) on the macOS side of things. I think adding a snap package would cover almost all the major linux distributions these days. https://snapcraft.io/

Additionally a scoop package should make it much easier to install pipx on Windows: https://scoop.sh/

Describe the solution you'd like Easy system installations of pipx:

brew install pipx
snap install pipx
scoop install pipx

Describe alternatives you've considered As you obviously know from creating pipx, pip is not an ideal installation method for system wide utilities. I think creating system packages for pipx on all three major platforms will help this tool grow.

6A61736F6E206E61646572 commented 4 years ago

Regarding scoop, have you tried submitting a PR to add pipx to scoop main or the extras bucket?

uranusjr commented 4 years ago

I mentioned in #244 I created a Scoop manifest, available here, but there are still disagreements how to do this best (see discussion in the linked issue). It’s probably a better idea to delay submitting this to the main bucket until there’s an agreement, and the Scoop manifest can be incorporated into the main pipx repository. Feel free to try that out in the mean time though. I’ve been using it for a while now and have not noticed any glitches.

aaronsteers commented 4 years ago

I'm not familiar with scoop but we use chocolatey a lot for windows installs. Are there advantages to scoop over chocolatey or are the pretty similar?

I often tell data analysts they need to install python just to get the pip package manager. It would be nice to either have a pipx standalone (bundled with python or only installs python if it is missing). Even if it still requires python installed, we could simply tell people:

choco install python3 REM skip if you have it already
choco install pipx
cs01 commented 4 years ago

I have no problem with pipx being on chocolatey and I doubt any other maintainers do. That said, pipx is maintained by unpaid volunteers in our spare time, so the limiting factor in getting pipx on all these package managers is the amount of time and energy the maintainers have to dedicate to that process. @AlJohri stepped up and got the ball rolling with pipx on brew. If you are interested in owning pipx on chocolatey, that would be welcome. If not, maybe one of the other maintainers would like to. I am personally not able to.

uranusjr commented 4 years ago

The aim is slightly different; Scoop is more focused on development tools that are more standalone (e.g. wget, git), while Chocolatey focus more on software with installers. But both can be made to do what the other does with enough work. I made the Scoop bundle because I use Scoop personally and am only familiar with its configuration, but the same bundling method can likely be applied to Chocolatey.

One package manager I’m most interested in is Winget from Microsoft. But that’s yet another thing I haven’t had the time to look into.

itsayellow commented 4 years ago

I started looking into Chocolatey. They don't have any documentation for creating a package around a pip-installable python application (that I could find.) And also there seem to be very very few python apps that are already packaged. It seems that as @uranusjr mentions, this may not be their main focus.

In general the packages I found seem to typically just install .exe files or .zip files that I assume unpack to .exe files.

I did find a Chocolatey package for buck, a python build manager. It seems to have a very simple install that we might replicate. Basically they just create a .bat wrapper that runs the python interpreter with the buck python app as an argument. Then the .bat file is put into the PATH. https://chocolatey.org/packages/buck

mathieuroche commented 3 years ago

For the choco part, as stated in the doc choco install, we can use: choco install pipx --source python

aaronsteers commented 3 years ago

Nice, @mathieuroche . I did not know this option existed!

Python

This specifies the source is Python and that we are installing a python package, such as Sphinx. If you do not have easy_install and Python installed, it will install those first and then the product requested. e.g. choco install sphinx --source python

vicmattos commented 2 years ago

Any update on this Issue? It would be awesome to have pipx installed in Windows as it is with Homebrew.

uranusjr commented 2 years ago

You already can. https://github.com/uranusjr/pipx-standalone

This issue is for incorporating the manifest into the pipx repo.

sitiom commented 11 months ago

Regarding scoop, have you tried submitting a PR to add pipx to scoop main or the extras bucket?

Extras bucket maintainer here. Here's a PR for it on the Main bucket:

tech189 commented 11 months ago

Thanks @sitiom, I've just merged it into the Main Scoop bucket! 🎉

jankap commented 11 months ago

One package manager I’m most interested in is Winget from Microsoft. But that’s yet another thing I haven’t had the time to look into.

@uranusjr I think more and more people are moving to winget, especially companies. Did you or anybody else have a chance to look at that?

Thanks :)

sitiom commented 11 months ago

I use Winget, too. However, Winget requires a standalone executable. Related issue:

Once the issue is resolved, I can gladly add it to Winget.

jankap commented 11 months ago

I use Winget, too. However, Winget requires a standalone executable. Related issue:

  • 244

Once the issue is resolved, I can gladly add it to Winget.

Understood, thank you :)

chrysle commented 10 months ago

Once the issue is resolved, I can gladly add it to Winget.

Can't you use the new zipapp?

sitiom commented 10 months ago

No. Winget only supports either standalone .exe binaries or installers (.msi, .exe).

chrysle commented 10 months ago

I'm not sure pipx will ever provide Windows executables.

dukecat0 commented 9 months ago

It's possible if we use https://github.com/ofek/pyapp to build the standalone binaries.

Paciupa commented 9 months ago

No. Winget only supports either standalone .exe binaries or installers (.msi, .exe).

Since v1.4 (released about a year ago) winget supports .zip archives.

sitiom commented 9 months ago

Yes, but only native executables/installers wrapped under a zip file.