-
Notifications
You must be signed in to change notification settings - Fork 204
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: Implement PEP735 support #2448
Conversation
b908705
to
d67f353
Compare
d67f353
to
cf6c9ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First off, thank you 💯, amazing contribution! Well documented, Kudos!
I have a few small requests to finish it off.
Also could it print in what location it was added in the pixi add
output. e.g.:
❯ pixi add --pypi --location optional-dependencies boltons
✔ Added boltons >=24.1.0, <25
Added these to `optional-dependencies`.
❯ pixi add --pypi numpy
✔ Added numpy >=2.1.3, <3
Added these as `project.dependencies`.
❯ pixi add --pypi --feature test pytest
✔ Added numpy >=2.1.3, <3
Added these as `dependency-groups`.
@olivier-lacroix would having a dependency-group with |
Yes it would |
83a23df
to
1fb1aa2
Compare
@ruben-arts , @tdejager this is ready to merge I think. @ruben-arts I started implementing the location printing, but I think this can wait a follow-up PR / decision on the CLI API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superb! Thanks for implementing this!
Fixes #2256 as well as #2149 (maybe we want to create a separate issue to interpret / use markers).
This PR adds handling of
[dependency-groups]
inpyproject.toml
:This PR also changes the behaviour of
pixi add --pypi
in case of apyproject.toml
manifest:[dependency-groups]
table instead of the[optional-dependencies]
table currently--platform
or--editable
is specified, the pypi dependency will be added to thetool.pixi.pypi-dependencies
table instead, since native arrays have no support for platform-specific or editable dependencies.This PR also changes the behaviour of
pixi init
when starting from an existingpyproject.toml
manifest:environments
table, similar to what is being done currently with groups of optional dependencies.As a drive-by improvement, when removing a pypi dependency from a
pyproject.toml
manifest, any empty array will be deleted.