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

Feature request: allow specifying that packages matching *something* should be downloaded from a secondary index #6100

Open
Kroppeb opened this issue Feb 27, 2024 · 3 comments
Labels
Type: Enhancement 💡 This is a feature or enhancement request.

Comments

@Kroppeb
Copy link

Kroppeb commented Feb 27, 2024

For our company, all private packages look like companyname-packagename. It would be cool if there were a way to specify that all packages that start with companyname- would be downloaded from a specific secondary index instead of the primary index. For packages that rely on other private packages, we currently have to mention to pipenv that those also come from the private repo explicitly.

Not sure if it would be best to allow specifying a regex or just (one or more) prefix strings.

Eg.

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"


[[source]]
url = "..."
verify_ssl = true
name = "company-pypi"
default_for = "companyname-.*"
# or just
default_for = "companyname-"
# or a list
default_for = ["companyname-"]
@Kroppeb
Copy link
Author

Kroppeb commented Feb 27, 2024

I'm willing to spend time implementing this, btw.

@sudharsan2020
Copy link

@Kroppeb Have you tried this? We are using Azure Artifacts to host private repos.
The below config is from our Pipfile

[[source]]
url = "https://{USER_NAME}:{PASSWORD}@pkgs.dev.azure.com/mYoRD/_packaging/lib-python%40Local/pypi/simple/"
verify_ssl = false
name = "home"

@matteius matteius added the Type: Enhancement 💡 This is a feature or enhancement request. label Mar 21, 2024
@Kroppeb
Copy link
Author

Kroppeb commented Mar 24, 2024

@sudharsan2020 Not sure what you mean? Are you suggesting to use our private repo als the only source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement 💡 This is a feature or enhancement request.
Projects
None yet
Development

No branches or pull requests

3 participants