Skip to content

Commit 6379d3d

Browse files
authored
Merge pull request #1909 from brettcannon/clarify-license-throughout-docs
Clarify throughout the docs that the `license` key in `pyproject.toml` is for the distribution
2 parents 22aaae8 + de9c12d commit 6379d3d

File tree

4 files changed

+29
-28
lines changed

4 files changed

+29
-28
lines changed

source/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Glossary
160160

161161
A string with valid SPDX license expression syntax,
162162
including one or more SPDX :term:`License Identifier`\(s),
163-
which describes a :term:`Project`'s license(s)
163+
which describes a :term:`Distribution Archive`'s license(s)
164164
and how they inter-relate.
165165
Examples:
166166
``GPL-3.0-or-later``,

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Licensing examples and user scenarios
66
=====================================
77

88

9-
:pep:`639` has specified the way to declare a project's license and paths to
10-
license files and other legally required information.
9+
:pep:`639` has specified the way to declare a :term:`Distribution Archive`'s
10+
license and paths to license files and other legally required information.
1111
This document aims to provide clear guidance how to migrate from the legacy
1212
to the standardized way of declaring licenses.
1313
Make sure your preferred build backend supports :pep:`639` before
@@ -53,7 +53,7 @@ Or, if the project used :file:`setup.cfg`, in its ``[metadata]`` table:
5353
[metadata]
5454
license = MIT
5555
56-
The output Core Metadata for the distribution packages would then be:
56+
The output Core Metadata for the :term:`Distribution Package` would then be:
5757

5858
.. code-block:: email
5959
@@ -63,8 +63,9 @@ The output Core Metadata for the distribution packages would then be:
6363
The :file:`LICENSE` file would be stored at :file:`/setuptools-{VERSION}/LICENSE`
6464
in the sdist and :file:`/setuptools-{VERSION}.dist-info/licenses/LICENSE`
6565
in the wheel, and unpacked from there into the site directory (e.g.
66-
:file:`site-packages/`) on installation; :file:`/` is the root of the respective archive
67-
and ``{VERSION}`` the version of the Setuptools release in the Core Metadata.
66+
:file:`site-packages/`) on installation; :file:`/` is the root of the respective
67+
archive and ``{VERSION}`` the version of the Setuptools release in the Core
68+
Metadata.
6869

6970

7071
.. _licensing-example-advanced:
@@ -83,7 +84,7 @@ directories; specifically:
8384
ordered-set==3.1.1
8485
more_itertools==8.8.0
8586
86-
The license expressions for these projects are:
87+
The appropriate license expressions are:
8788

8889
.. code-block:: text
8990
@@ -287,7 +288,7 @@ and make sure to remove any legacy ``license`` table subkeys or
287288
``License ::`` classifiers. Your existing ``license`` value may already
288289
be valid as one (e.g. ``MIT``, ``Apache-2.0 OR BSD-2-Clause``, etc);
289290
otherwise, check the `SPDX license list <spdxlist_>`__ for the identifier
290-
that matches the license used in your project.
291+
that matches the license used.
291292

292293
Make sure to list your license files under ``license-files``
293294
under ``[project]`` in :file:`pyproject.toml`
@@ -312,12 +313,11 @@ to describe the licenses involved and the relationship
312313
between them.
313314

314315
In short, ``License-1 AND License-2`` mean that *both* licenses apply
315-
to your project, or parts of it (for example, you included a file
316-
under another license), and ``License-1 OR License-2`` means that
317-
*either* of the licenses can be used, at the user's option (for example,
318-
you want to allow users a choice of multiple licenses). You can use
319-
parenthesis (``()``) for grouping to form expressions that cover even the most
320-
complex situations.
316+
(for example, you included a file under another license), and
317+
``License-1 OR License-2`` means that *either* of the licenses can be used, at
318+
the user's option (for example, you want to allow users a choice of multiple
319+
licenses). You can use parenthesis (``()``) for grouping to form expressions
320+
that cover even the most complex situations.
321321

322322
In your project config file, enter your license expression under
323323
``license`` (``[project]`` table of :file:`pyproject.toml`),

source/guides/writing-pyproject-toml.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ You can also specify the format explicitly, like this:
296296
``license`` and ``license-files``
297297
---------------------------------
298298

299-
As per :pep:`639` licenses should be declared with two fields:
299+
As per :pep:`639`, licenses should be declared with two fields:
300300

301-
- ``license`` is an :term:`SPDX license expression <License Expression>` consisting
302-
of one or more :term:`license identifiers <License Identifier>`.
301+
- ``license`` is an :term:`SPDX license expression <License Expression>`
302+
consisting of one or more :term:`license identifiers <License Identifier>`.
303303
- ``license-files`` is a list of license file glob patterns.
304304

305305
A previous PEP had specified ``license`` to be a table with a ``file`` or a
@@ -350,10 +350,11 @@ As a general rule, it is a good idea to use a standard, well-known
350350
license, both to avoid confusion and because some organizations avoid software
351351
whose license is unapproved.
352352

353-
If your project is licensed with a license that doesn't have an existing SPDX
354-
identifier, you can create a custom one in format ``LicenseRef-[idstring]``.
355-
The custom identifiers must follow the SPDX specification,
356-
`clause 10.1 <spdxcustomids_>`_ of the version 2.2 or any later compatible one.
353+
If your :term:`Distribution Archive` is licensed with a license that doesn't
354+
have an existing SPDX identifier, you can create a custom one in format
355+
``LicenseRef-[idstring]``. The custom identifiers must follow the SPDX
356+
specification, `clause 10.1 <spdxcustomids_>`_ of the version 2.2 or any later
357+
compatible one.
357358

358359
.. code-block:: toml
359360

source/tutorials/packaging-projects.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ following this tutorial.
220220
your package will work on. For a complete list of classifiers, see
221221
https://pypi.org/classifiers/.
222222
- ``license`` is the :term:`SPDX license expression <License Expression>` of
223-
your package.
223+
your :term:`Distribution Archive` files.
224224
- ``license-files`` is the list of glob paths to the license files,
225225
relative to the directory where :file:`pyproject.toml` is located.
226226
- ``urls`` lets you list any number of extra links to show on PyPI.
@@ -250,12 +250,12 @@ if you'd like.
250250
Creating a LICENSE
251251
------------------
252252

253-
It's important for every package uploaded to the Python Package Index to include
254-
a license. This tells users who install your package the terms under which they
255-
can use your package. For help picking a license, see
256-
https://choosealicense.com/. Once you have chosen a license, open
257-
:file:`LICENSE` and enter the license text. For example, if you had chosen the
258-
MIT license:
253+
It's important for every :term:`Distribution Archive` uploaded to the Python
254+
Package Index to include a license. This tells users who install your
255+
:term:`Distribution Archive` the terms under which they can use it. For help
256+
picking a license, see https://choosealicense.com/. Once you have chosen a
257+
license, open :file:`LICENSE` and enter the license text. For example, if you
258+
had chosen the MIT license:
259259

260260
.. code-block:: text
261261

0 commit comments

Comments
 (0)