-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add a project setting to control if and where a project can be published #3692
Comments
The way to do this is to include it in the "classifiers" section [tool.poetry]
# ...
classifiers = [
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules"
] You want to add
for your private projects |
AFAIK this is the "official Pythonic" way, see |
That's a good trick to know, thank you. I still think being able to specify a default repository to publish to would be useful and that enforcing not uploading a package would be better served at the tool level rather than having PyPI reject a package after upload. |
This might be same as #1537 . |
Is this supported now? Its been over a year with no comments / updates. |
I think this doesn't actually depend on poetry. It's specified by PyPI already: So it should work, I guess |
Duplicate of #1537 |
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. |
Feature Request
I would like to propose that
poetry
have a project-level configuration option that would let you restrict which repositories a package gets published to or even prevent it from being published at all.Rust's package manager
cargo
has a field in itsCargo.toml
file that does just that. I think the behavior described here is exactly whatpoetry
should adopt.https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field
I work on both public and private projects and this would be a nice addition for my peace of mind. I could make sure a private package doesn't accidentally get published to PyPI or even just prevent a package that is early in development from being published prematurely. It would also make publishing to private repositories easier as you would not need to specify the private repository with
poetry publish -r
.The text was updated successfully, but these errors were encountered: