Skip to content

Commit fb161a2

Browse files
authored
Implement PEP 639 (pypa#4829)
2 parents 07e96b1 + 5bb11cb commit fb161a2

25 files changed

+868
-194
lines changed

docs/userguide/miscellaneous.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ files are included in a source distribution by default:
2424
in ``pyproject.toml`` and/or equivalent in ``setup.cfg``/``setup.py``;
2525
note that if you don't explicitly set this parameter, ``setuptools``
2626
will include any files that match the following glob patterns:
27-
``LICENSE*``, ``LICENCE*``, ``COPYING*``, ``NOTICE*``, ``AUTHORS**``;
27+
``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, ``AUTHORS**``;
2828
- ``pyproject.toml``;
2929
- ``setup.cfg``;
3030
- ``setup.py``;

docs/userguide/pyproject_config.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The ``project`` table contains metadata fields as described by the
4949
readme = "README.rst"
5050
requires-python = ">=3.8"
5151
keywords = ["one", "two"]
52-
license = {text = "BSD-3-Clause"}
52+
license = "BSD-3-Clause"
5353
classifiers = [
5454
"Framework :: Django",
5555
"Programming Language :: Python :: 3",
@@ -99,7 +99,8 @@ Key Value Type (TOML) Notes
9999
See :doc:`/userguide/datafiles`.
100100
``exclude-package-data`` table/inline-table Empty by default. See :doc:`/userguide/datafiles`.
101101
------------------------- --------------------------- -------------------------
102-
``license-files`` array of glob patterns **Provisional** - likely to change with :pep:`639`
102+
``license-files`` array of glob patterns **Deprecated** - use ``project.license-files`` instead. See
103+
:external+PyPUG:ref:`Writing your pyproject.toml <license-files>`
103104
(by default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``)
104105
``data-files`` table/inline-table **Discouraged** - check :doc:`/userguide/datafiles`.
105106
Whenever possible, consider using data files inside the package directories.

newsfragments/4706.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added initial support for license expression (:pep:`PEP 639 <639#add-license-expression-field>`). -- by :user:`cdce8p`

newsfragments/4728.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Store ``License-File``s in ``.dist-info/licenses`` subfolder and added support for recursive globs for ``license_files`` (:pep:`PEP 639 <639#add-license-expression-field>`). -- by :user:`cdce8p`

newsfragments/4734.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated ``pyproject.toml`` validation via ``validate-pyproject`` v0.23.0.

newsfragments/4830.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump core metadata version to ``2.4``. -- by :user:`cdce8p`

newsfragments/4833.feature.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Added exception (or warning) when deprecated license classifiers are used,
2+
according to `PEP 639 <https://peps.python.org/pep-0639/#deprecate-license-classifiers>`_.

newsfragments/4837.feature.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Deprecated ``tools.setuptools.license-files`` in favor of ``project.license-files``
2+
and added exception if ``project.license-files`` and ``tools.setuptools.license-files``
3+
are used together. -- by :user:`cdce8p`

newsfragments/4838.feature.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Added simple validation for given glob patterns in ``license-files``:
2+
a warning will be generated if no file is matched.
3+
Invalid glob patterns can raise an exception.
4+
-- thanks :user:`cdce8p` for contributions.

newsfragments/4840.feature.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Deprecated ``project.license`` as a TOML table in
2+
``pyproject.toml``. Users are expected to move towards using
3+
``project.license-files`` and/or SPDX expressions (as strings) in
4+
``pyproject.license``.
5+
See :pep:`PEP 639 <639#deprecate-license-key-table-subkeys>`.

0 commit comments

Comments
 (0)