pypa / packaging.python.org

Python Packaging User Guide
http://packaging.python.org
1.44k stars 933 forks source link

Document the "Do not upload" classifier trick #643

Closed pganssle closed 2 years ago

pganssle commented 5 years ago

In this tweet, @di mentions a trick to prevent accidentally uploading your packages to PyPI by adding a Private :: Do Not Upload classifier and in the thread @ewdurbin mentioned that he had made Private a reserved top-level classifier so the trick works reliably.

It seems like it would be a good idea to document this somewhere for easy linking. It could go into a tutorial or maybe we can add a "miscellaneous tips and tricks" section?

ewdurbin commented 5 years ago

https://github.com/pypa/warehouse/blob/master/warehouse/templates/pages/classifiers.html which renders https://pypi.org/classifiers/ could probably also address this.

Julian commented 5 years ago

Should there be a License :: Closed Source for this? Having two ways to do it isn't great obviously, but possibly the advantage of using License is some tools maybe care about being able to ask about the license anyhow from classifiers, so maybe using that namespace solves both?

pfmoore commented 5 years ago

I may well have an open source project that I don't want to upload to PyPI (maybe because it's not yet ready for broad distribution).

imankulov commented 4 years ago

I came across this issue while finding a way to mark my python packages as private. Adding a cross-reference to a change in Warehouse which sort of "institutionalizes the trick": https://github.com/pypa/warehouse/pull/5440

hugovk commented 2 years ago

https://github.com/pypa/warehouse/blob/master/warehouse/templates/pages/classifiers.html which renders pypi.org/classifiers could probably also address this.

Please see PR https://github.com/pypa/warehouse/pull/10872 to document it on that page.

Is that sufficient or is something also needed on https://packaging.python.org?

hugovk commented 2 years ago

Is that sufficient or is something also needed on packaging.python.org?

Please see https://github.com/pypa/packaging.python.org/pull/1056 as well :)