How can I choose a source on a per-dependency basis?
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Question
I would like to specify a source for a dependency on a per-dependency basis.
I would like to do this for a number of reasons:
- PyPi is much faster than my private repository, so it makes sense to install all of my non-private dependencies from PyPi
- I don’t understand the semantics of specifying another source… Will that source be used for all dependencies, or just ones that are not found in PyPi? (If the latter, that is a security issue as someone could register our package’s name on PyPi and have their code included in our app)
Therefore it seems to me that the way to have understandable semantics and the best installation speed is to support something like:
[[tool.poetry.source]]
name = "my-private-repo"
url = "http://<hostname>/simple/"
[tool.poetry.dependencies]
python = "^3.6"
my-private-package = { version = "^x.y.z", source = "my-private-repo }
Issue Analytics
- State:
- Created 5 years ago
- Reactions:15
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Maven – Optional Dependencies and Dependency Exclusions
This section discusses optional dependencies and dependency exclusions. This will help users to understand what they are and when and how to use...
Read more >Learning the Basics - Gradle User Manual
Gradle supports a wide range of sources for dependencies, both in terms of format ... Giving a reason for choosing a certain module...
Read more >Get source jar files attached to Eclipse for Maven-managed ...
I was able to download the sources by control-clicking the project in Navigator view and choosing "m2 Maven"-->"Download Sources". I was then able...
Read more >Controlling Scope and Lifetime — Autofac 6.0.0 documentation
While some things in Autofac have changed over time, the concepts described there remain valid and may be helpful in understanding lifetime scopes....
Read more >Dependency Injection with Autofac - CodeProject
Autofac is an open-source dependency injection (DI) or inversion of control ... This article uses an example to demonstrate the most basic ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d like to be able to specify a default source and then override it on a per-dependency basis. The use case is that for most of my packages I am use the public PyPI index but also have a couple private packages on a private repo.
Something like this would be perfect.
This is now available in the latest beta release (see #908 for more information).