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

Add pixi package to winget #323

Closed
traversaro opened this issue Sep 6, 2023 · 21 comments · Fixed by #547
Closed

Add pixi package to winget #323

traversaro opened this issue Sep 6, 2023 · 21 comments · Fixed by #547
Labels
🆘 help wanted Maintainers would like community input ✨ enhancement Feature request 👋 good first issue Good for newcomers

Comments

@traversaro
Copy link
Contributor

traversaro commented Sep 6, 2023

Problem description

I recently set up a new Windows machine, and I installed almost everything I needed in the PC (including Visual Studio compilers via VS BuildTools) via winget, the Windows Package Manager (https://learn.microsoft.com/en-us/windows/package-manager/), and I found it quite convenient (I never used it before).

I do not feel enough about this at the moment to work directly on this (and mantain the resulting package), but anyhow I thought for dissemination it could be useful to have a pixi package on winget, to streamline installation on Windows. See conda-forge/miniforge#163, microsoft/winget-pkgs#16674 and https://github.com/search?q=repo%3Amicrosoft%2Fwinget-pkgs+CondaForge&type=pullrequests for similar issues/PRs for miniforge.

@traversaro traversaro added the ✨ enhancement Feature request label Sep 6, 2023
@wolfv
Copy link
Member

wolfv commented Sep 6, 2023

Do you think we could use Winget as well to make it easier to get the MSVC compilers in conda-forge? Is winget available by default these days?

@traversaro
Copy link
Contributor Author

Do you think we could use Winget as well to make it easier to get the MSVC compilers in conda-forge?

I am afraid what winget just runs the VS installer, see https://github.com/microsoft/winget-pkgs/blob/c8cd037949988530141dc6c276cea432144df74c/manifests/m/Microsoft/VisualStudio/2019/BuildTools/16.11.25/Microsoft.VisualStudio.2019.BuildTools.installer.yaml#L88 .

Is winget available by default these days?

It was in my Windows Version 10.0.22621.2134 freshly installed.

@wolfv
Copy link
Member

wolfv commented Sep 7, 2023

Cool – do you know if it requires user interaction?

@traversaro
Copy link
Contributor Author

Cool – do you know if it requires user interaction?

I am not really sure, basically it opened some window during the installation, I can't recall if I closed myself or not. Furthermore, by default C++ part of Visual Studio are not installed, I installed manually them from the GUI, but perhaps it is possible to enable them via terminal.

@baszalmstra baszalmstra added 👋 good first issue Good for newcomers 🆘 help wanted Maintainers would like community input labels Sep 11, 2023
@dhirschfeld
Copy link
Contributor

Do you think we could use Winget as well to make it easier to get the MSVC compilers in conda-forge?

Is installing the compilers an issue? I've done it previously similarly to:
https://learn.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2022#create-and-build-the-dockerfile

Worked fine, though took an age to build the container.

@wolfv
Copy link
Member

wolfv commented Sep 12, 2023

Ah cool, this is good to know. I don't think the vc-feedstock package has code to grab the compilers if they are not yet on the system. I think that could be a very nice enhancement (since we cannot repackage them, at least make it easy to install them when needed).

@maphew
Copy link

maphew commented Nov 30, 2023

Winget can't be used for Pixi unless/until it's packaged into an installer:

At this time installers must be MSIX, MSI, APPX, or .exe application installers. Script-based installers and fonts are not currently supported.
-- https://github.com/microsoft/winget-pkgs

@baszalmstra
Copy link
Contributor

We have an msi installer in the releases, would that work?

@pavelzw
Copy link
Contributor

pavelzw commented Nov 30, 2023

@maphew
Copy link

maphew commented Nov 30, 2023

Oh! Thanks I didn't see those. I looked at in install.ps1 and thought that was the extent of it. I've submitted packages to winget before and am happy to take this one on if it's still an open task.

@maphew
Copy link

maphew commented Nov 30, 2023

PR issued: microsoft/winget-pkgs#128712. Please look over the .yaml files to ensure the right values are set for Author, Publisher, etc.

@wolfv
Copy link
Member

wolfv commented Dec 1, 2023

Awesome @maphew 🚀

@traversaro
Copy link
Contributor Author

Thanks @maphew ! Just as a curiosity, there is any mechanism for the automatic update of the package or this needs to be done manually at every new pixi release?

@wolfv
Copy link
Member

wolfv commented Dec 1, 2023

Maybe "Komac" helps? :) https://github.com/russellbanks/Komac (I was wondering the same, @traversaro)

@traversaro
Copy link
Contributor Author

miniforge3-related PRs seems to be at least semi-automatic: https://github.com/search?q=repo%3Amicrosoft%2Fwinget-pkgs+miniforge3&type=pullrequests .

@pavelzw
Copy link
Contributor

pavelzw commented Dec 1, 2023

It's probably the same as with homebrew where the core maintainers do automated PRs for all packages.

@maphew
Copy link

maphew commented Dec 1, 2023

:) Komac is what I used to create the package. I read that it can be integrated with CI via https://github.com/vedantmgoyal2009/winget-releaser.

@maphew
Copy link

maphew commented Dec 1, 2023

Winget can't be used for Pixi unless/until it's packaged into an installer:

At this time installers must be MSIX, MSI, APPX, or .exe application installers. Script-based installers and fonts are not currently supported.
-- https://github.com/microsoft/winget-pkgs

Apparently zip is supported now too, microsoft/winget-cli#140, though I've yet to locate a doc page on it and don't know why it's not noted yet on front of repo.

@maphew
Copy link

maphew commented Dec 5, 2023

The PR has been merged :) Pixi is available via Winget.

CMD C:\Users\matt
» winget install prefix-dev.pixi
Found pixi [prefix-dev.pixi] Version 0.9.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/prefix-dev/pixi/releases/download/v0.9.1/pixi-x86_64-pc-windows-msvc.msi
  ██████████████████████████████  10.0 MB / 10.0 MB
Successfully verified installer hash
Starting package install...
Successfully installed

CMD C:\Users\matt
» where pixi
C:\Users\matt\.pixi\bin\pixi.exe

CMD C:\Users\matt
» pixi --version
pixi 0.9.1

Should this issue be closed? Or simply updated to add "and add Winget Releaser to Gitgub actions"?

@pavelzw
Copy link
Contributor

pavelzw commented Dec 5, 2023

Do we need to maintain a releaser? I would guess that the team at winget try to automatically update all packages there.

We should add it to the readme though.

@maphew
Copy link

maphew commented Dec 5, 2023

I'm pretty sure the winget team doesn't auto check for updates, else Winget Releaser wouldn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆘 help wanted Maintainers would like community input ✨ enhancement Feature request 👋 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants