Skip to content

Commit 80f145b

Browse files
committed
fixup! fixup! Add the licensing examples and user scenarios
1 parent e354b41 commit 80f145b

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

source/guides/licensing-examples-and-user-scenarios.rst

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,36 @@ Licensing Examples
2020
Basic example
2121
-------------
2222

23-
The Setuptools project itself, as of `version 59.1.1 <setuptools5911_>`__,
23+
The Setuptools project itself, as of `version 75.6.0 <setuptools7560_>`__,
2424
does not use the ``License`` field in its own project source metadata.
2525
Further, it no longer explicitly specifies ``license_file``/``license_files``
2626
as it did previously, since Setuptools relies on its own automatic
2727
inclusion of license-related files matching common patterns,
2828
such as the :file:`LICENSE` file it uses.
2929

30-
It includes the following license-related metadata in its :file:`setup.cfg`:
30+
It includes the following license-related metadata in its
31+
:file:`pyproject.toml`:
3132

32-
.. code-block:: ini
33+
.. code-block:: toml
3334
34-
[metadata]
35+
[project]
3536
classifiers =
3637
License :: OSI Approved :: MIT License
3738
3839
The simplest migration to PEP 639 would consist of using this instead:
3940

40-
.. code-block:: ini
41-
42-
[metadata]
43-
license_expression = MIT
44-
45-
Or, in the ``[project]`` table of :file:`pyproject.toml`:
46-
4741
.. code-block:: toml
4842
4943
[project]
5044
license = "MIT"
5145
46+
Or, if the project used :file:`setup.cfg`, in its ``[metadata]`` table:
47+
48+
.. code-block:: ini
49+
50+
[metadata]
51+
license = MIT
52+
5253
The output Core Metadata for the distribution packages would then be:
5354

5455
.. code-block:: email
@@ -115,20 +116,7 @@ paths in the project source tree (relative to the project root and
115116
setuptools/_vendor/packaging/LICENSE.APACHE
116117
setuptools/_vendor/packaging/LICENSE.BSD
117118
118-
Putting it all together, our :file:`setup.cfg` would be:
119-
120-
.. code-block:: ini
121-
122-
[metadata]
123-
license_expression = MIT AND (Apache-2.0 OR BSD-2-Clause)
124-
license_files =
125-
LICENSE
126-
setuptools/_vendor/packaging/LICENSE
127-
setuptools/_vendor/packaging/LICENSE.APACHE
128-
setuptools/_vendor/packaging/LICENSE.BSD
129-
130-
In the ``[project]`` table of :file:`pyproject.toml`, license files
131-
can be specified via glob patterns:
119+
Putting it all together, our :file:`pyproject.toml` would be:
132120

133121
.. code-block:: toml
134122
@@ -139,8 +127,8 @@ can be specified via glob patterns:
139127
"setuptools/_vendor/LICENSE*",
140128
]
141129
142-
Or alternatively, they can be specified explicitly (paths will be interpreted
143-
as glob patterns):
130+
Or alternatively, the license files can be specified explicitly (paths will be
131+
interpreted as glob patterns):
144132

145133
.. code-block:: toml
146134
@@ -153,6 +141,18 @@ as glob patterns):
153141
"setuptools/_vendor/LICENSE.BSD",
154142
]
155143
144+
If our project used :file:`setup.cfg`, we could define this in :
145+
146+
.. code-block:: ini
147+
148+
[metadata]
149+
license = MIT AND (Apache-2.0 OR BSD-2-Clause)
150+
license_files =
151+
LICENSE
152+
setuptools/_vendor/packaging/LICENSE
153+
setuptools/_vendor/packaging/LICENSE.APACHE
154+
setuptools/_vendor/packaging/LICENSE.BSD
155+
156156
With either approach, the output Core Metadata in the distribution
157157
would be:
158158

@@ -350,6 +350,6 @@ using SPDX identifiers and expressions.
350350
.. _dontchoosealicense: https://choosealicense.com/no-permission/
351351
.. _mappingclassifierstospdx: https://peps.python.org/pep-0639/appendix-mapping-classifiers/
352352
.. _packaginglicense: https://github.com/pypa/packaging/blob/21.2/LICENSE
353-
.. _setuptools5911: https://github.com/pypa/setuptools/blob/v59.1.1/setup.cfg
353+
.. _setuptools7560: https://github.com/pypa/setuptools/blob/v75.6.0/pyproject.toml
354354
.. _spdxlist: https://spdx.org/licenses/
355355
.. _spdxtutorial: https://github.com/david-a-wheeler/spdx-tutorial

0 commit comments

Comments
 (0)