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: add to pypi in feature #1135

Merged
merged 3 commits into from
Apr 8, 2024

Conversation

ruben-arts
Copy link
Contributor

fixes #1133

Now you can also run:

pixi add --feature test --pypi elsie

This results in a pixi.toml to:

[feature.test.pypi-dependencies]
elsie = "*"

and in a pyproject.toml to:

[tool.pixi.feature.test.pypi-dependencies]
elsie = "*"

Note, it doesn't add it to the optional dependencies not sure if we should do that. @olivier-lacroix what do you think?

@olivier-lacroix
Copy link
Contributor

olivier-lacroix commented Apr 6, 2024

Great @ruben-arts. I had wondered why there was not feature argument to add_pypi_dependency then forgot about it 🤭.

Yes, I reckon for pyproject.toml, it would make sense to add pypi dependencies to the native pyproject.toml arrays.

We should also

  • refactor duplicate detection to leverage the manifest rather than the toml document (as duplicates can be in different Toml tables)
  • modify dependency removal to try and remove from the various possible tables (pixi and native pyproject)

@ruben-arts ruben-arts requested a review from tdejager April 8, 2024 07:45
src/project/manifest/document.rs Outdated Show resolved Hide resolved
@ruben-arts ruben-arts merged commit 20013a7 into prefix-dev:main Apr 8, 2024
23 of 24 checks passed
@matthewfeickert
Copy link
Contributor

Thank you for adding this! I was going to open an Issue asking for it last night, but great to see it in the v0.19.0 release notes today. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect behaviour with pixi add --feature --pypi
4 participants