poetry self and custom sources
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the FAQ and general documentation and believe that my question is not already covered.
Feature Request
I’m preparing for the eventuality of the export plugin not being installed by default. When running poetry self add poetry-plugin-export, I noticed that the files were being downloaded from pythonhosted.org instead of my company’s repos. I’d prefer that poetry retrieve artifacts from my company’s internal repos.
Expectation
⭐ ⭐ ⭐ ⭐ ⭐ = A command line option would be great:
poetry self add poetry-plugin-export --index-url https://example.com/proxies/pypi/simple
⭐ ⭐ ⭐ ⭐ = But I could also see this being a one-time setup thing:
poetry self config pip.global.index-url https://example.com/proxies/pypi/simple
⭐ ⭐ ⭐ = but this probably works for now until something nicer exists:
${POETRY_HOME}/bin/pip3 config --site set global.index-url https://example.com/proxies/pypi/simple
But I don’t have a good way for poetry to tell me its venv path for scripting, e.g. something like
POETRY_HOME=$(poetry self venv)
or to run something in poetry’s venv with a command like
poetry self run pip config …
Related:
Issue Analytics
- State:
- Created a year ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Repositories | Documentation | Poetry - Python dependency ...
Poetry can fetch and install package dependencies from public or private custom repositories that implement the simple repository API as described in PEP...
Read more >Dependency Management With Python Poetry
Learn how Python Poetry will help you start new projects, maintain existing ones, and master dependency management.
Read more >A Prayer for my Daughter by W. B. Yeats - Poems | poets.org
Find and share the perfect poems. ... For beauty's very self, has charm made wise, And many a poor man that ... And...
Read more >Dependency Scanning - GitLab Docs
For self-managed GitLab instances in an environment with limited, restricted, or intermittent access to external resources through the internet, some ...
Read more >What to Consider When Self-Publishing Poetry Books
Learn how to self-publish poetry books by following our guide to poetry, ... keep in mind that there are great resources available in...
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 Free
Top 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

poetry self addis not respecting your source as you have configured your project to use your proxied source, not your Poetry instance. We are referring to the internal pyproject.toml used by Poetry to manage itself, located at~/.config/pypoetry/pyproject.tomlon a Linux system.When adding/removing plugins with
poetry self, Poetry is used to manage Poetry. You have been confused to believe that project-level source configuration has any level of influence over Poetry’s global state; it does not.If you’re still confused by this, please reach out via another channel (e.g. Discord) for assistance as we’re just generating noise on this ticket at this point.
OK - gottit, I did indeed misunderstand. Thanks for bearing with me.
Nonetheless, the end result is that I am still seeing an issue (though it might be a different root cause) resulting in the inability to install plugins from a local pypi mirror due to poetry insisting on doing dependency resolution against PyPi for
self add.pyproject.toml:
So, you can see,
poetry self addisn’t paying attention to the[[tool.poetry.source]]section, and is trying to reach out to PyPi (and failing to do so due to an SSL error caused by a proxy - that’s fine, and expected).