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: alternative pypi registries #1225

Merged
merged 32 commits into from
Apr 30, 2024

Conversation

tdejager
Copy link
Contributor

@tdejager tdejager commented Apr 18, 2024

Enables the use of alternative PyPI registries. The definition of these can be specified per feature. There are certain rules for making unions out of these that are explained throughout the code.

This adds the options for:

  • extra-index-urls
  • index-urls
  • find-links

Which follows the familiar pypi conventions. These are deserialized and passed per solve to uv.

@tdejager tdejager mentioned this pull request Apr 18, 2024
@wolfv
Copy link
Member

wolfv commented Apr 20, 2024

Here is some real-life environment.yml that uses the --extra-index-url argument of pip: https://github.com/zliucz/animate-your-word/blob/main/environment.yml. Would be nice to support that :)

@tdejager tdejager changed the title wip: private pypi registries feat: private pypi registries Apr 25, 2024
@tdejager tdejager changed the title feat: private pypi registries feat: alternative pypi registries Apr 25, 2024
@zachcp
Copy link

zachcp commented Apr 28, 2024

.... its getting close .....

@vlad-ivanov-name
Copy link
Contributor

Will this also support keyring integration, like uv's --keyring-provider option? Or something similar to fetch credentials via a command

@tdejager
Copy link
Contributor Author

@vlad-ivanov-name #1279 will add this. We can look at alternative authentication methods later :)

@tdejager tdejager marked this pull request as ready for review April 29, 2024 15:03
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Is there a way to test the find links feature?


[feature.alternative.pypi-options]
index-url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
[feature.alternative.pypi-dependencies]
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this require a definition of that dependency here to be seen in the resolution?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I don't understand what you mean :)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yeah, I meant to say, can't you just define the PyPi dependencies once?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, then it goes into the default feature

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the time I made the example 'no-default' was not yet a thing but I could use that now 😀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Think I understand you now, made the example a bit simpler.

@tdejager
Copy link
Contributor Author

Is there a way to test the find links feature?

There is an example using this.

@tdejager
Copy link
Contributor Author

@ruben-arts I've added some documentation regarding to the feature.

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Awesome

@tdejager tdejager enabled auto-merge (squash) April 30, 2024 09:34
@tdejager tdejager merged commit f94882e into prefix-dev:main Apr 30, 2024
28 checks passed
wolfv pushed a commit to wolfv/pixi that referenced this pull request May 3, 2024
Enables the use of alternative PyPI registries. The definition of these
can be specified per feature. There are certain rules for making unions
out of these that are explained throughout the code.

This adds the options for:
* extra-index-urls
* index-urls
* find-links

Which follows the familiar pypi conventions. These are deserialized and
passed per environment or solve-group solve to uv.

---------

Co-authored-by: Bas Zalmstra <[email protected]>
Co-authored-by: Bas Zalmstra <[email protected]>
Co-authored-by: Ruben Arts <[email protected]>
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.

6 participants