Skip to content

Commit

Permalink
Update the packaging tutorial according to PEP 639
Browse files Browse the repository at this point in the history
  • Loading branch information
befeleme committed Jan 7, 2025
1 parent 09fc121 commit f5195da
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions source/tutorials/packaging-projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ following this tutorial.
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
license = "MIT"
license-files = ["LICEN[CS]E*"]
[project.urls]
Homepage = "https://github.com/pypa/sampleproject"
Expand All @@ -242,11 +243,15 @@ following this tutorial.
packages until it finds one that has a matching Python version.
- ``classifiers`` gives the index and :ref:`pip` some additional metadata
about your package. In this case, the package is only compatible with Python
3, is licensed under the MIT license, and is OS-independent. You should
always include at least which version(s) of Python your package works on,
which license your package is available under, and which operating systems
3 and is OS-independent. You should
always include at least which version(s) of Python your package works on
and which operating systems
your package will work on. For a complete list of classifiers, see
https://pypi.org/classifiers/.
- ``license`` is the :term:`SPDX license expression <License Expression>` of
your package.
- ``license-files`` is the list of glob paths to the license files,
relative to the directory where :file:`pyproject.toml` is located.
- ``urls`` lets you list any number of extra links to show on PyPI.
Generally this could be to the source, documentation, issue trackers, etc.

Expand Down Expand Up @@ -305,6 +310,9 @@ MIT license:
Most build backends automatically include license files in packages. See your
backend's documentation for more details.
If you include the path to license in the ``license-files`` key of
:file:`pyproject.toml`, and your build backend supports :pep:`639`,
the file will be automatically included in the package.


Including other files
Expand Down

0 comments on commit f5195da

Please sign in to comment.