@@ -28,9 +28,9 @@ does not use the ``License`` field in its own project source metadata.
2828Further, it no longer explicitly specifies ``license_file ``/``license_files ``
2929as it did previously, since Setuptools relies on its own automatic
3030inclusion of license-related files matching common patterns,
31- such as the `` LICENSE ` ` file it uses.
31+ such as the :file: ` LICENSE ` file it uses.
3232
33- It includes the following license-related metadata in its `` setup.cfg ` `:
33+ It includes the following license-related metadata in its :file: ` setup.cfg `:
3434
3535.. code-block :: ini
3636
@@ -45,7 +45,7 @@ The simplest migration to PEP 639 would consist of using this instead:
4545 [metadata]
4646 license_expression = MIT
4747
48- Or, in the ``[project] `` table of `` pyproject.toml ` `:
48+ Or, in the ``[project] `` table of :file: ` pyproject.toml `:
4949
5050.. code-block :: toml
5151
@@ -59,11 +59,11 @@ The output Core Metadata for the distribution packages would then be:
5959 License-Expression: MIT
6060 License-File: LICENSE
6161
62- The `` LICENSE `` file would be stored at `` /setuptools-$ {VERSION}/LICENSE ` `
63- in the sdist and `` /setuptools-$ {VERSION}.dist-info/licenses/LICENSE ` `
62+ The :file: ` LICENSE ` file would be stored at :file: ` /setuptools-{ VERSION } /LICENSE `
63+ in the sdist and :file: ` /setuptools-{ VERSION } .dist-info/licenses/LICENSE `
6464in the wheel, and unpacked from there into the site directory (e.g.
65- `` site-packages `` ) on installation; `` / ` ` is the root of the respective archive
66- and ``$ {VERSION} `` the version of the Setuptools release in the Core Metadata.
65+ :file: ` site-packages `) on installation; :file: ` / ` is the root of the respective archive
66+ and ``{VERSION} `` the version of the Setuptools release in the Core Metadata.
6767
6868
6969.. _licensing-example-advanced :
@@ -72,7 +72,7 @@ Advanced example
7272''''''''''''''''
7373
7474Suppose Setuptools were to include the licenses of the third-party projects
75- that are vendored in the `` setuptools/_vendor/ `` and `` pkg_resources/_vendor ` `
75+ that are vendored in the :file: ` setuptools/_vendor/ ` and :file: ` pkg_resources/_vendor/ `
7676directories; specifically:
7777
7878.. code-block :: text
@@ -100,16 +100,16 @@ combining all the license expressions into one. Such an expression might be:
100100 MIT AND (Apache-2.0 OR BSD-2-Clause)
101101
102102 In addition, per the requirements of the licenses, the relevant license files
103- must be included in the package. Suppose the `` LICENSE ` ` file contains the text
103+ must be included in the package. Suppose the :file: ` LICENSE ` file contains the text
104104of the MIT license and the copyrights used by Setuptools, ``pyparsing ``,
105- ``more_itertools `` and ``ordered-set ``; and the `` LICENSE* ` ` files in the
106- `` setuptools/_vendor/packaging/ ` ` directory contain the Apache 2.0 and
105+ ``more_itertools `` and ``ordered-set ``; and the :file: ` LICENSE* ` files in the
106+ :file: ` setuptools/_vendor/packaging/ ` directory contain the Apache 2.0 and
1071072-clause BSD license text, and the Packaging copyright statement and
108108`license choice notice <packaginglicense _>`__.
109109
110110Specifically, we assume the license files are located at the following
111111paths in the project source tree (relative to the project root and
112- `` pyproject.toml ` `):
112+ :file: ` pyproject.toml `):
113113
114114.. code-block :: ini
115115
@@ -118,7 +118,7 @@ paths in the project source tree (relative to the project root and
118118 setuptools/_vendor/packaging/LICENSE.APACHE
119119 setuptools/_vendor/packaging/LICENSE.BSD
120120
121- Putting it all together, our `` setup.cfg ` ` would be:
121+ Putting it all together, our :file: ` setup.cfg ` would be:
122122
123123.. code-block :: ini
124124
@@ -130,7 +130,7 @@ Putting it all together, our ``setup.cfg`` would be:
130130 setuptools/_vendor/packaging/LICENSE.APACHE
131131 setuptools/_vendor/packaging/LICENSE.BSD
132132
133- In the ``[project] `` table of `` pyproject.toml ` `, license files
133+ In the ``[project] `` table of :file: ` pyproject.toml `, license files
134134can be specified via glob patterns:
135135
136136.. code-block :: toml
@@ -167,36 +167,36 @@ would be:
167167 License-File: setuptools/_vendor/packaging/LICENSE.APACHE
168168 License-File: setuptools/_vendor/packaging/LICENSE.BSD
169169
170- In the resulting sdist, with `` / `` as the root of the archive and ``$ {VERSION} ``
170+ In the resulting sdist, with :file: ` / ` as the root of the archive and ``{VERSION} ``
171171the version of the Setuptools release specified in the Core Metadata,
172172the license files would be located at the paths:
173173
174174.. code-block :: shell
175175
176- /setuptools-$ {VERSION} /LICENSE
177- /setuptools-$ {VERSION} /setuptools/_vendor/packaging/LICENSE
178- /setuptools-$ {VERSION} /setuptools/_vendor/packaging/LICENSE.APACHE
179- /setuptools-$ {VERSION} /setuptools/_vendor/packaging/LICENSE.BSD
176+ /setuptools-{VERSION}/LICENSE
177+ /setuptools-{VERSION}/setuptools/_vendor/packaging/LICENSE
178+ /setuptools-{VERSION}/setuptools/_vendor/packaging/LICENSE.APACHE
179+ /setuptools-{VERSION}/setuptools/_vendor/packaging/LICENSE.BSD
180180
181- In the built wheel, with `` / ` ` being the root of the archive and
182- ``$ {VERSION} `` as the previous, the license files would be stored at:
181+ In the built wheel, with :file: ` / ` being the root of the archive and
182+ ``{VERSION} `` as the previous, the license files would be stored at:
183183
184184.. code-block :: shell
185185
186- /setuptools-$ {VERSION} .dist-info/licenses/LICENSE
187- /setuptools-$ {VERSION} .dist-info/licenses/setuptools/_vendor/packaging/LICENSE
188- /setuptools-$ {VERSION} .dist-info/licenses/setuptools/_vendor/packaging/LICENSE.APACHE
189- /setuptools-$ {VERSION} .dist-info/licenses/setuptools/_vendor/packaging/LICENSE.BSD
186+ /setuptools-{VERSION}.dist-info/licenses/LICENSE
187+ /setuptools-{VERSION}.dist-info/licenses/setuptools/_vendor/packaging/LICENSE
188+ /setuptools-{VERSION}.dist-info/licenses/setuptools/_vendor/packaging/LICENSE.APACHE
189+ /setuptools-{VERSION}.dist-info/licenses/setuptools/_vendor/packaging/LICENSE.BSD
190190
191- Finally, in the installed project, with `` site-packages ` ` being the site dir
192- and ``$ {VERSION} `` as the previous, the license files would be installed to:
191+ Finally, in the installed project, with :file: ` site-packages ` being the site dir
192+ and ``{VERSION} `` as the previous, the license files would be installed to:
193193
194194.. code-block :: shell
195195
196- site-packages/setuptools-$ {VERSION} .dist-info/licenses/LICENSE
197- site-packages/setuptools-$ {VERSION} .dist-info/licenses/setuptools/_vendor/packaging/LICENSE
198- site-packages/setuptools-$ {VERSION} .dist-info/licenses/setuptools/_vendor/packaging/LICENSE.APACHE
199- site-packages/setuptools-$ {VERSION} .dist-info/licenses/setuptools/_vendor/packaging/LICENSE.BSD
196+ site-packages/setuptools-{VERSION}.dist-info/licenses/LICENSE
197+ site-packages/setuptools-{VERSION}.dist-info/licenses/setuptools/_vendor/packaging/LICENSE
198+ site-packages/setuptools-{VERSION}.dist-info/licenses/setuptools/_vendor/packaging/LICENSE.APACHE
199+ site-packages/setuptools-{VERSION}.dist-info/licenses/setuptools/_vendor/packaging/LICENSE.BSD
200200
201201
202202 Expression examples
@@ -238,7 +238,7 @@ a formal license, so you wouldn't necessarily have to do anything extra here.
238238
239239However, it is still a good idea to include ``LicenseRef-Proprietary ``
240240as a license expression in your package configuration, and/or a
241- copyright statement and any legal notices in a `` LICENSE.txt ` ` file
241+ copyright statement and any legal notices in a :file: ` LICENSE.txt ` file
242242in the root of your project directory, which will be automatically
243243included by packaging tools.
244244
@@ -254,20 +254,20 @@ widely used and allows anyone to do whatever they want with your work
254254(other than sue you, which you probably also don't want).
255255
256256To apply it, just paste `the text <chooseamitlicense _>`__ into a file named
257- `` LICENSE.txt ` ` at the root of your repo, and add the year and your name to
257+ :file: ` LICENSE.txt ` at the root of your repo, and add the year and your name to
258258the copyright line. Then, just add ``license = "MIT" `` under
259- ``[project] `` in your `` pyproject.toml ` ` if your packaging tool supports it,
259+ ``[project] `` in your :file: ` pyproject.toml ` if your packaging tool supports it,
260260or in its config file/section. You're done!
261261
262262
263263I want to distribute my project under a specific license
264264''''''''''''''''''''''''''''''''''''''''''''''''''''''''
265265
266- To use a particular license, simply paste its text into a `` LICENSE.txt ` `
266+ To use a particular license, simply paste its text into a :file: ` LICENSE.txt `
267267file at the root of your repo, if you don't have it in a file starting with
268- `` LICENSE `` or `` COPYING ` ` already, and add
268+ :file: ` LICENSE ` or :file: ` COPYING ` already, and add
269269``license = "LICENSE-ID" `` under ``[project] `` in your
270- `` pyproject.toml ` ` if your packaging tool supports it, or else in its
270+ :file: ` pyproject.toml ` if your packaging tool supports it, or else in its
271271config file. You can find the ``LICENSE-ID ``
272272and copyable license text on sites like
273273`ChooseALicense <choosealicenselist _>`__ or `SPDX <spdxlist _>`__.
@@ -284,7 +284,7 @@ should only need to make a couple of tweaks to take advantage of the new
284284functionality.
285285
286286In your project config file, enter your license expression under
287- ``license `` (``[project] `` table in `` pyproject.toml ` `),
287+ ``license `` (``[project] `` table in :file: ` pyproject.toml `),
288288or the equivalent for your packaging tool,
289289and make sure to remove any legacy ``license `` table subkeys or
290290``License :: `` classifiers. Your existing ``license `` value may already
@@ -293,7 +293,7 @@ otherwise, check the `SPDX license list <spdxlist_>`__ for the identifier
293293that matches the license used in your project.
294294
295295Make sure to list your license files under ``license-files ``
296- under ``[project] `` in `` pyproject.toml ` `
296+ under ``[project] `` in :file: ` pyproject.toml `
297297or else in your tool's configuration file.
298298
299299See the :ref: `licensing-example-basic ` for a simple but complete real-world demo
@@ -320,23 +320,23 @@ parenthesis (``()``) for grouping to form expressions that cover even the most
320320complex situations.
321321
322322In your project config file, enter your license expression under
323- ``license `` (``[project] `` table of `` pyproject.toml ` `),
323+ ``license `` (``[project] `` table of :file: ` pyproject.toml `),
324324or the equivalent for your packaging tool,
325325and make sure to remove any legacy ``license `` table subkeys
326326or ``License :: `` classifiers.
327327
328328Also, make sure you add the full license text of all the licenses as files
329329somewhere in your project repository. List the
330330relative path or glob patterns to each of them under ``license-files ``
331- under ``[project] `` in `` pyproject.toml ` `
331+ under ``[project] `` in :file: ` pyproject.toml `
332332(if your tool supports it), or else in your tool's configuration file.
333333
334334As an example, if your project was licensed MIT but incorporated
335335a vendored dependency (say, ``packaging ``) that was licensed under
336336either Apache 2.0 or the 2-clause BSD, your license expression would
337337be ``MIT AND (Apache-2.0 OR BSD-2-Clause) ``. You might have a
338- `` LICENSE.txt `` in your repo root, and a `` LICENSE-APACHE.txt ` ` and
339- `` LICENSE-BSD.txt ` ` in the ``_vendor `` subdirectory, so to include
338+ :file: ` LICENSE.txt ` in your repo root, and a :file: ` LICENSE-APACHE.txt ` and
339+ :file: ` LICENSE-BSD.txt ` in the ``_vendor `` subdirectory, so to include
340340all of them, you'd specify ``["LICENSE.txt", "_vendor/packaging/LICENSE*"] ``
341341as glob patterns, or
342342``["LICENSE.txt", "_vendor/LICENSE-APACHE.txt", "_vendor/LICENSE-BSD.txt"] ``
0 commit comments