Read Source URLs from pyproject.toml During Publishing
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
Issue
When attempting to publish packages from CI infrastructure, such as Jenkins, poetry will fail when a config file cannot be found and a --repository=something
option is present. Instead of throwing a RuntimeError, the URL for the source could be read from the [[tool.poetry.source]]
section(s) in a pyproject.toml file. Whether reading from pyproject.toml should happen upfront or be the fallback behavior, does not make a difference to me.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:7 (3 by maintainers)
Top Results From Across the Web
The pyproject.toml file | Documentation | Poetry
If you publish your package on PyPI, they will appear in the Project Links section. Poetry and PEP-517 #. PEP-517 introduces a standard...
Read more >Replacing the URL of a source (e.g. PyPI) at the global level
Why can't I set URL via config and write something like this in pyproject.toml: [[tool.poetry.source]] name = "my_repo" secondary = true.
Read more >The pyproject.toml config file — Flit 3.8.0 documentation
Flit looks for the source of the package by its import name. The source may be located either in the directory that holds...
Read more >pyproject.toml - Martin Thoma
The pyproject.toml file allows package creators to define the build system as a dependency as well as a projects metadata.
Read more >How to Publish an Open-Source Python Package to PyPI
You can link to other URLs by specifying them in the project. urls table in pyproject. toml . In the example, the URLs...
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
Partialy correct. It today supports only configuration via env vars or via config files. In,
--repository=something
something
should always be the name of a configured publishable repository. At present there are no plans to include the upload api endpoint as a configurable in thetool.poetry.source
section. This is the status quo. This might change if there is a reasonable proposal. I suspect there has been talks about allowing a new section to let a project specify where it should be uploaded by default. But that is outside the scope of this issue I feel. Feel free to raise a discussion and/or propose a change in a PR.See also https://python-poetry.org/docs/master/repositories/#publishable-repositories.
Beep-boop, might be stale, but still an issue