@@ -15,13 +15,10 @@ to the standardized way of declaring licenses.
1515Licensing Examples
1616==================
1717
18- Examples
19- --------
20-
2118.. _licensing-example-basic :
2219
2320Basic example
24- '''''''''''''
21+ -------------
2522
2623The Setuptools project itself, as of `version 59.1.1 <setuptools5911 _>`__,
2724does not use the ``License `` field in its own project source metadata.
@@ -69,7 +66,7 @@ and ``{VERSION}`` the version of the Setuptools release in the Core Metadata.
6966.. _licensing-example-advanced :
7067
7168Advanced example
72- ''''''''''''''''
69+ ----------------
7370
7471Suppose Setuptools were to include the licenses of the third-party projects
7572that are vendored in the :file: `setuptools/_vendor/ ` and :file: `pkg_resources/_vendor/ `
@@ -111,7 +108,7 @@ Specifically, we assume the license files are located at the following
111108paths in the project source tree (relative to the project root and
112109:file: `pyproject.toml `):
113110
114- .. code-block :: ini
111+ .. code-block :: text
115112
116113 LICENSE
117114 setuptools/_vendor/packaging/LICENSE
@@ -171,7 +168,7 @@ In the resulting sdist, with :file:`/` as the root of the archive and ``{VERSION
171168the version of the Setuptools release specified in the Core Metadata,
172169the license files would be located at the paths:
173170
174- .. code-block :: shell
171+ .. code-block :: text
175172
176173 /setuptools-{VERSION}/LICENSE
177174 /setuptools-{VERSION}/setuptools/_vendor/packaging/LICENSE
@@ -191,7 +188,7 @@ In the built wheel, with :file:`/` being the root of the archive and
191188 Finally, in the installed project, with :file: `site-packages/ ` being the site dir
192189and ``{VERSION} `` as the previous, the license files would be installed to:
193190
194- .. code-block :: shell
191+ .. code-block :: text
195192
196193 site-packages/setuptools-{VERSION}.dist-info/licenses/LICENSE
197194 site-packages/setuptools-{VERSION}.dist-info/licenses/setuptools/_vendor/packaging/LICENSE
@@ -219,9 +216,6 @@ Some additional examples of valid ``License-Expression`` values:
219216 User Scenarios
220217==============
221218
222- User Scenarios
223- --------------
224-
225219The following covers the range of common use cases from a user perspective,
226220providing guidance for each. Do note that the following
227221should **not ** be considered legal advice, and readers should consult a
@@ -230,7 +224,7 @@ the specifics for their situation.
230224
231225
232226I have a private package that won't be distributed
233- ''''''''''''''''''''''''''''''''''''''''''''''''''
227+ --------------------------------------------------
234228
235229If your package isn't shared publicly, i.e. outside your company,
236230organization or household, it *usually * isn't strictly necessary to include
@@ -244,7 +238,7 @@ included by packaging tools.
244238
245239
246240I just want to share my own work without legal restrictions
247- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
241+ -----------------------------------------------------------
248242
249243While you aren't required to include a license, if you don't, no one has
250244`any permission to download, use or improve your work <dontchoosealicense _>`__,
@@ -261,7 +255,7 @@ or in its config file/section. You're done!
261255
262256
263257I want to distribute my project under a specific license
264- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
258+ --------------------------------------------------------
265259
266260To use a particular license, simply paste its text into a :file: `LICENSE.txt `
267261file at the root of your repo, if you don't have it in a file starting with
@@ -277,7 +271,7 @@ license file for you, and may support the expression as well in the future.
277271
278272
279273I maintain an existing package that's already licensed
280- ''''''''''''''''''''''''''''''''''''''''''''''''''''''
274+ ------------------------------------------------------
281275
282276If you already have license files and metadata in your project, you
283277should only need to make a couple of tweaks to take advantage of the new
@@ -297,13 +291,16 @@ under ``[project]`` in :file:`pyproject.toml`
297291or else in your tool's configuration file.
298292
299293See the :ref: `licensing-example-basic ` for a simple but complete real-world demo
300- of how this works in practiced.
294+ of how this works in practice.
295+ See also the best-effort guidance on how to translate license classifiers
296+ into license expression provided by the :pep: `639 ` authors:
297+ `Mapping License Classifiers to SPDX Identifiers <mappingclassifierstospdx_>__ `.
301298Packaging tools may support automatically converting legacy licensing
302299metadata; check your tool's documentation for more information.
303300
304301
305302My package includes other code under different licenses
306- '''''''''''''''''''''''''''''''''''''''''''''''''''''''
303+ -------------------------------------------------------
307304
308305If your project includes code from others covered by different licenses,
309306such as vendored dependencies or files copied from other open source
@@ -351,6 +348,7 @@ using SPDX identifiers and expressions.
351348.. _chooseamitlicense : https://choosealicense.com/licenses/mit/
352349.. _choosealicenselist : https://choosealicense.com/licenses/
353350.. _dontchoosealicense : https://choosealicense.com/no-permission/
351+ .. _mappingclassifierstospdx : https://peps.python.org/pep-0639/appendix-mapping-classifiers/
354352.. _packaginglicense : https://github.com/pypa/packaging/blob/21.2/LICENSE
355353.. _setuptools5911 : https://github.com/pypa/setuptools/blob/v59.1.1/setup.cfg
356354.. _spdxlist : https://spdx.org/licenses/
0 commit comments