From 75bd2ea0c5dcab20451ee38eb988cf14c6f70e10 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 20 Nov 2025 12:33:15 -0600 Subject: [PATCH] Move do not upload publish note out of the guide into concepts (#16789) This feels a little out of place here and it seems nice to be able to link to it. --- docs/concepts/projects/build.md | 15 +++++++++++++++ docs/guides/package.md | 16 ---------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/docs/concepts/projects/build.md b/docs/concepts/projects/build.md index 42b92c657..50b0d1237 100644 --- a/docs/concepts/projects/build.md +++ b/docs/concepts/projects/build.md @@ -57,3 +57,18 @@ that the downloaded `setuptools` distribution matches the specified hash: ```console $ uv build --build-constraint constraints.txt --require-hashes ``` + +## Preventing publish to PyPI + +If you have internal packages that you do not want to be published, you can mark them as private: + +```toml +[project] +classifiers = ["Private :: Do Not Upload"] +``` + +This setting makes PyPI reject your uploaded package from publishing. It does not affect security or +privacy settings on alternative registries. + +We also recommend only generating [per-project PyPI API tokens](https://pypi.org/help/#apitoken): +Without a PyPI token matching the project, it can't be accidentally published. diff --git a/docs/guides/package.md b/docs/guides/package.md index cf14390c0..f207a4e05 100644 --- a/docs/guides/package.md +++ b/docs/guides/package.md @@ -18,22 +18,6 @@ build it by default. This means that your project may not be ready for distribut the effect of declaring a build system in the [project concept](../concepts/projects/config.md#build-systems) documentation. -!!! note - - If you have internal packages that you do not want to be published, you can mark them as - private: - - ```toml - [project] - classifiers = ["Private :: Do Not Upload"] - ``` - - This setting makes PyPI reject your uploaded package from publishing. It does not affect - security or privacy settings on alternative registries. - - We also recommend only generating [per-project PyPI API tokens](https://pypi.org/help/#apitoken): - Without a PyPI token matching the project, it can't be accidentally published. - ## Building your package Build your package with `uv build`: