Code Monkey home page Code Monkey logo

Comments (7)

abn avatar abn commented on July 17, 2024 1

@languitar

[[tool.poetry.source]]
name = "foo"
url = "https://foo.bar/simple/"

[[tool.poetry.source]]
name = "bar"
url = "https://bar.baz/simple/"

This is equivalent to

tool.poetry.source = [
 { name = "foo", url = "https://foo.bar/simple/" },
 { name = "bar", url = "https://bar.baz/simple/" }
]

from poetry.

sdispater avatar sdispater commented on July 17, 2024

This is already supported.

You can actually add any number of repositories as described here: https://poetry.eustace.io/docs/repositories/#install-dependencies-from-a-private-repository

When you install packages, poetry will look sequentially in every repository configured.

from poetry.

languitar avatar languitar commented on July 17, 2024

How would that work with the repository specification inside the pyproject.toml in tool.poetry.source?

from poetry.

languitar avatar languitar commented on July 17, 2024

Oh yes thanks. I missed the double brackets when reading the examples

from poetry.

TheFriendlyCoder avatar TheFriendlyCoder commented on July 17, 2024

Can someone confirm what the resolution order is for looking up packages when there are multiple sources defined? Based on my ad-hoc testing it would appear as though every source repo is used for every package lookup, which seems odd. I would have expected the resolver to stop at the first source that provided a valid match.

from poetry.

leiflm avatar leiflm commented on July 17, 2024
[[tool.poetry.source]]
name = "foo"
url = "https://foo.bar/simple/"

[[tool.poetry.source]]
name = "bar"
url = "https://bar.baz/simple/"

This is equivalent to

tool.poetry.source = [
 { name = "foo", url = "https://foo.bar/simple/" },
 { name = "bar", url = "https://bar.baz/simple/" }
]

Just a heads-up for anybody coming across this, wondering why it won't work for them.

Using an array of tables seems to be broken for source:

poetry check
Error: [urls.tool] {'poetry': {'source': [{'name': 'foo', 'url': 'https://foo.bar/simple/'}, {'name': 'bar', 'url': 'https://bar.baz/simple/'}]}} is not of type 'string'

from poetry.

github-actions avatar github-actions commented on July 17, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from poetry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.