From add1888139641c404df77a662fa9bd501503173d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssia=20Sampaio?= <4005687+cassiasamp@users.noreply.github.com> Date: Tue, 25 Feb 2025 16:49:15 -0300 Subject: [PATCH 1/2] update packaging-projects.rst - fixed the raised value and configuration errors in pyproject.toml - made explicit the creation of a LICENSE file - added TestPyPI installation example (package wasn't recognized with current's tutorial command) --- source/tutorials/packaging-projects.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/tutorials/packaging-projects.rst b/source/tutorials/packaging-projects.rst index 8992fffb0..c9b0f9d7a 100644 --- a/source/tutorials/packaging-projects.rst +++ b/source/tutorials/packaging-projects.rst @@ -217,8 +217,7 @@ following this tutorial. "Programming Language :: Python :: 3", "Operating System :: OS Independent", ] - license = "MIT" - license-files = ["LICEN[CS]E*"] + license = { file = "LICENSE.md" } [project.urls] Homepage = "https://github.com/pypa/sampleproject" @@ -308,7 +307,7 @@ Creating a LICENSE It's important for every package uploaded to the Python Package Index to include a license. This tells users who install your package the terms under which they can use your package. For help picking a license, see -https://choosealicense.com/. Once you have chosen a license, open +https://choosealicense.com/. Once you have chosen a license, create a file called :file:`LICENSE`, open :file:`LICENSE` and enter the license text. For example, if you had chosen the MIT license: @@ -486,6 +485,14 @@ and install your package from TestPyPI: python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps example-package-YOUR-USERNAME-HERE + + In case there is an issue with the above instruction and the package isn't recognized, use the link provided at TestPyPI: + + .. code-block:: bash + + pip install -i https://test.pypi.org/simple/ example-package-YOUR-USERNAME-HERE + + .. tab:: Windows .. code-block:: bat From 8b0d4c2b2287a070d13489adb8a6f80785587f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssia=20Sampaio?= <4005687+cassiasamp@users.noreply.github.com> Date: Tue, 4 Mar 2025 19:15:32 -0300 Subject: [PATCH 2/2] Apply suggestions from code review Thank you @sinoroc. Accepting changes. Co-authored-by: sinoroc <5529267+sinoroc@users.noreply.github.com> --- source/tutorials/packaging-projects.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/tutorials/packaging-projects.rst b/source/tutorials/packaging-projects.rst index c9b0f9d7a..1cbb8897d 100644 --- a/source/tutorials/packaging-projects.rst +++ b/source/tutorials/packaging-projects.rst @@ -217,7 +217,7 @@ following this tutorial. "Programming Language :: Python :: 3", "Operating System :: OS Independent", ] - license = { file = "LICENSE.md" } + license = { file = "LICENSE" } [project.urls] Homepage = "https://github.com/pypa/sampleproject" @@ -490,7 +490,7 @@ and install your package from TestPyPI: .. code-block:: bash - pip install -i https://test.pypi.org/simple/ example-package-YOUR-USERNAME-HERE + python3 -m pip install --index-url https://test.pypi.org/simple/ example-package-YOUR-USERNAME-HERE .. tab:: Windows