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 --pypi to pixi add subcommand #498

Closed
ruben-arts opened this issue Nov 27, 2023 · 4 comments · Fixed by #539
Closed

Add --pypi to pixi add subcommand #498

ruben-arts opened this issue Nov 27, 2023 · 4 comments · Fixed by #539
Assignees

Comments

@ruben-arts
Copy link
Contributor

ruben-arts commented Nov 27, 2023

We want the users to have the ability to add pypi-dependencies to the pixi.toml.

pixi add --pypi haystack[inference]
# Result: haystack = { version = "==x.y.z", extra = ["inference"] }
pixi add --pypi "pytest==7.4.1"
# Result: pytest = "==7.4.1"
pixi add --pypi numpy
# Result: numpy = "==x.y.z"
@rahuldave
Copy link

rahuldave commented Nov 29, 2023

For nice UX, do we want add to follow on to pypi if no matches found in conda-forge or similar? For example, for haystack. Or be explicit? (currently i believe we have to explicitly add to pypi-dependencies in pixi.toml...

Regardless this issue i think is critical for adoption and user-friendly usage!

@ruben-arts
Copy link
Contributor Author

I think you are right that that would be very helpful, but first lets go the explicit route and then see how we can make it more user friendly. Especially while the PyPI integration is in alpha mode.

@codegod100
Copy link

@rahuldave I came here to say the same thing. I'm kinda lazy and just wanna "pixi add" without config stuff. @ruben-arts might have a good point on wanting the dust to settle first.

@rahuldave
Copy link

I think "pixi add -pypi" is a great start! I am a bit confused about resolution though. Dependencies for a pypi install are pypi satisfied or fail , or will the resolution go back to conda channels?

baszalmstra added a commit that referenced this issue Dec 7, 2023
This PR will let the user add pypi packages to the `pixi.toml`
Examples:
- `pixi add --pypi pytest matplotlib==3.8.0`
- `pixi add --pypi --platform linux-64 pytest<7`

Some notable mentions:
- The `pixi add` spec type is not a `matchspec` anymore but a normal
string to create two code paths.
- This also add the `[target.platfrom.pypi-dependencies]` to the
manifest
- This PR does **not**  include the `pixi rm --pypi x` yet

Closes #498 and closes #499

---------

Co-authored-by: Bas Zalmstra <zalmstra.bas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants