question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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.

https://github.com/sdispater/poetry/blob/9dac5bf0ad36415592fd03d049cd8d1adedd161f/poetry/masonry/publishing/publisher.py#L42-L53

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
abncommented, May 25, 2022

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 the tool.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.

1reaction
kevinkjt2000commented, Nov 13, 2019

Beep-boop, might be stale, but still an issue

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found