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

feat: --pypi for add command #539

Merged
merged 15 commits into from
Dec 7, 2023

Conversation

ruben-arts
Copy link
Contributor

@ruben-arts ruben-arts commented Dec 4, 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

src/cli/add.rs Outdated Show resolved Hide resolved
src/cli/add.rs Outdated
let requirement = PyPiRequirement::from(req);
Ok((name, requirement))
})
.collect();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just add the question mark here? Instead of mapping the result? Then the code below no longer needs the map.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it

src/project/manifest.rs Outdated Show resolved Hide resolved
src/project/mod.rs Outdated Show resolved Hide resolved
src/project/mod.rs Outdated Show resolved Hide resolved
tests/common/mod.rs Outdated Show resolved Hide resolved
@ruben-arts ruben-arts marked this pull request as ready for review December 6, 2023 11:15
@baszalmstra baszalmstra changed the title Feature/pixi add pypi feat: --pypi for add command Dec 7, 2023
@baszalmstra baszalmstra merged commit d7052a0 into prefix-dev:main Dec 7, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants