feat: Add support for private PyPI repositories #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for private PyPI repositories (e.g., Artifactory, Nexus) in the custom Python component. Users can now configure a private PyPI repository as an additional package index alongside the public PyPI.
Configuration options added:
enabled: Toggle to enable/disable the featureurl: Private PyPI repository URL (PEP 503 compliant simple index)username: Optional username for authentication#password: Encrypted password/token for authenticationThe implementation uses uv's environment variables (
UV_INDEX,UV_INDEX_PRIVATE_USERNAME,UV_INDEX_PRIVATE_PASSWORD) to configure the additional index and authentication.Review & Testing Checklist for Human
UV_INDEX=private=<url>is the correct format for uv to recognize an additional index. The uv docs suggest this should work but needs verification.#passwordwhich should map toencrypted_passwordvia theencrypted_keysfunction - verify this works correctly.uv syncbehavior: When using Git source withpyproject.toml/uv.lock, verify thatuv sync --inexactrespects theUV_INDEXenvironment variable.Recommended test plan:
private_pypi.enabled=trueand valid credentialsNotes
Note:
_setup_private_pypi_envis called redundantly ininstall_packages_for_repository(once directly, once viainstall_packages). This is harmless but could be cleaned up.Link to Devin run: https://app.devin.ai/sessions/a858822356fb4c66962081b4b638ee82
Requested by: Vojta Tuma (@yustme)
Release Notes
Justification, description
Adds support for private PyPI repositories to enable users to install packages from internal package indexes like Artifactory or Nexus.
Plans for Customer Communication
N/A
Impact Analysis
Low risk - feature is opt-in and disabled by default. Existing configurations without
private_pypiwill continue to work unchanged.Deployment Plan
N/A
Rollback Plan
N/A
Post-Release Support Plan
N/A