Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repositories configurable in pyproject.toml #3335

Closed
1 task done
farndt opened this issue Dec 6, 2024 · 1 comment · Fixed by #3337
Closed
1 task done

Repositories configurable in pyproject.toml #3335

farndt opened this issue Dec 6, 2024 · 1 comment · Fixed by #3337
Assignees
Labels
⭐ enhancement Improvements for existing features

Comments

@farndt
Copy link

farndt commented Dec 6, 2024

Feature Description

Repositories can be configured in pyproject.toml. The credentials are read from the OS credential stores via keyring.

Problem and Solution

Problem:
According to https://pdm-project.org/en/latest/usage/config/#configure-the-repositories-for-upload repositories are only configurable via config.toml or environment variables. If developers are working on different python projects that all need to upload to different repositories, all developers must configure the repos individually. With the option of configuring this within pyproject.toml for pdm, it would be possible to share the configuration. Use case in company.

Solution:

[[tool.pdm.repo]]
name = "company"
url = "https://artifactory.company.com/artifactory/api/pypi/remote"

pdm publish --repository company to start publishing.

Keyring will read pdm-repository-company from Credential Store to receive username and password

Additional Context

No response

Are you willing to contribute to the development of this feature?

  • Yes, I am willing to contribute to the development of this feature.
@farndt farndt added the ⭐ enhancement Improvements for existing features label Dec 6, 2024
@frostming frostming self-assigned this Dec 6, 2024
frostming added a commit that referenced this issue Dec 6, 2024
Fixes #3335

Signed-off-by: Frost Ming <me@frostming.com>
@lorenzosciarra
Copy link

Hi @frostming, can you make an example of how this allows to include repository configuration into pyproject.toml files? I can't figure it out other than putting it into a pdm.toml file, which I would like to use only for the credentials. Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants