Skip to content

Conversation

@aryanyk
Copy link

@aryanyk aryanyk commented Dec 17, 2025

Context

This PR implements support for specifying a custom PyPI index when adding a PyPI dependency via the pixi add command, as requested in #4587.

Currently, users must manually edit the manifest to configure a non-default PyPI index. This change brings Pixi in line with tools like uv add by allowing the index to be specified directly at add-time.


What’s changed

  • Added a new --index <URL> parameter to pixi add --pypi
  • Wired the provided index URL into the generated PixiPypiSpec for the added dependency
  • Ensured the change is per-dependency, not workspace-wide
  • Added an integration test validating that the index is persisted correctly in the manifest

result

Example

pixi add --pypi requests --index https://example.com/simple


### Checklist:

-  I have performed a self-review of my own code
-  I have commented my code, particularly in hard-to-understand areas
-  I have added sufficient tests to cover my changes.




@aryanyk aryanyk closed this Dec 17, 2025
@aryanyk aryanyk reopened this Dec 17, 2025
@tdejager
Copy link
Contributor

Hey @aryanyk! Thanks for the PR can you fill out the template correctly? :)

@aryanyk
Copy link
Author

aryanyk commented Dec 20, 2025

Hi @tdejager

Thanks for the reminder!
I’ve updated the PR description to fully match the template and added testing details.

Description
Fixes #4587

This PR implements support for specifying a custom PyPI index when adding a PyPI dependency via the pixi add command, as requested in #4587.

What’s changed

  1. Added a new --index parameter to pixi add --pypi
  2. Wired the provided index URL into the generated PixiPypiSpec for the added dependency
  3. Ensured the change is per-dependency, not workspace-wide
  4. Added an integration test validating that the index is persisted correctly in the manifest

How Has This Been Tested?
AI Disclosure

  • This PR contains AI-generated content.
  • I have tested any AI-generated content in my PR.
  • I take responsibility for any AI-generated content in my PR.
  • Tools: {e.g., Claude Sonnet 4.5 ,ChatGPT 5.2}

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

@aryanyk
Copy link
Author

aryanyk commented Dec 20, 2025

Thanks for the review!

Just to clarify: this PR (#5151) is the cleaned-up, non-draft implementation intended for merge.
The earlier draft PR was exploratory and can be ignored.

I’ve updated the PR description to fully match the template.
Happy to investigate or rerun CI if you’d like me to dig into the pixi-build failures.

@lucascolley lucascolley added enhancement New features area:add Related to pixi add pypi Issue related to PyPI dependencies labels Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:add Related to pixi add enhancement New features pypi Issue related to PyPI dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants