@@ -43,13 +43,13 @@ The PEP also:
4343 tools converting legacy license metadata, adding license files and
4444 validating license expressions.
4545
46- - Discusses `user scenarios <User Scenarios _>`_,
47- describes a `reference implementation <Reference Implementation _>`_,
46+ - Describes a `reference implementation <Reference Implementation _>`_,
4847 analyzes numerous `potential alternatives <Rejected Ideas _>`_,
49- includes `detailed examples <Appendix 1. License Expression Examples _>`_ and
48+ includes `detailed examples <Appendix: License Expression Examples _>`_,
49+ explains `user scenarios <Appendix: User Scenarios _>`_ and
5050 surveys license documentation
51- `in Python packaging <Appendix 2. License Documentation in Python _>`_ and
52- `other ecosystems <Appendix 3. License Documentation in Other Projects _>`_.
51+ `in Python packaging <Appendix: License Documentation in Python _>`_ and
52+ `other ecosystems <Appendix: License Documentation in Other Projects _>`_.
5353
5454The changes in this PEP will update the
5555`core metadata <#coremetadataspec >`_ to version 2.3, modify the
@@ -145,10 +145,10 @@ Rationale
145145
146146A survey of existing license metadata definitions in use in the Python
147147ecosystem today is provided in
148- `Appendix 2 <Appendix 2. License Documentation in Python _>`_ of this PEP,
148+ `an appendix <Appendix: License Documentation in Python _>`_ of this PEP,
149149and license documentation in a variety of other packaging systems,
150150Linux distros, languages ecosystems and applications is surveyed in
151- `Appendix 3 <Appendix 3. License Documentation in Other Projects _>`_.
151+ `another appendix <Appendix: License Documentation in Other Projects _>`_.
152152
153153There are a few takeaways from the survey:
154154
@@ -835,143 +835,6 @@ MUST NOT automatically infer a license expression, and SHOULD suggest that the
835835package author construct one which expresses their intent.
836836
837837
838- User Scenarios
839- ==============
840-
841- The following covers the range of common use cases from a user perspective,
842- providing straightforward guidance for each. Do note that the following
843- should **not ** be considered legal advice, and readers should consult a
844- licensed attorney if they are unsure about the specifics for their situation.
845-
846-
847- I have a private package that won't be distributed
848- --------------------------------------------------
849-
850- If your package isn't shared publicly, i.e. outside your company,
851- organization or household, it *usually * isn't strictly necessary to include
852- a formal license, so you wouldn't necessarily have to do anything extra here.
853-
854- However, it is still a good idea to include ``LicenseRef-Proprietary ``
855- as a license expression in your package configuration, and/or a
856- copyright statement and any legal notices in a ``LICENSE.txt `` file
857- in the root of your project directory, which will be automatically
858- included by packaging tools.
859-
860-
861- I just want to share my own work without legal restrictions
862- -----------------------------------------------------------
863-
864- While you aren't required to include a license, if you don't, no one has
865- `any permission to download, use or improve your work <#dontchoosealicense _>`_,
866- so that's probably the *opposite * of what you actually want.
867- The `MIT license <#mitlicense _>`_ is a great choice instead, as it's simple,
868- widely used and allows anyone to do whatever they want with your work
869- (other than sue you, which you probably also don't want).
870-
871- To apply it, just paste `the text <#chooseamitlicense _>`_ into a file named
872- ``LICENSE.txt `` at the root of your repo, and add the year and your name to
873- the copyright line. Then, just add ``license-expression = "MIT" `` under
874- ``[project] `` in your ``pyproject.toml `` if your packaging tool supports it,
875- or in its config file/section (e.g. Setuptools ``license_expression = MIT ``
876- under ``[metadata] `` in ``setup.cfg ``). You're done!
877-
878-
879- I want to distribute my project under a specific license
880- --------------------------------------------------------
881-
882- To use a particular license, simply paste its text into a ``LICENSE.txt ``
883- file at the root of your repo, if you don't have it in a file starting with
884- ``LICENSE `` or ``COPYING `` already, and add
885- ``license-expression = "LICENSE-ID" `` under ``[project] `` in your
886- ``pyproject.toml `` if your packaging tool supports it, or else in its
887- config file (e.g. for Setuptools, ``license_expression = LICENSE-ID ``
888- under ``[metadata] `` in ``setup.cfg ``). You can find the ``LICENSE-ID ``
889- and copyable license text on sites like
890- `ChooseALicense <#choosealicenselist _>`_ or `SPDX <#spdxlist _>`_.
891-
892- Many popular code hosts, project templates and packaging tools can add the
893- license file for you, and may support the expression as well in the future.
894-
895-
896- I maintain an existing package that's already licensed
897- ------------------------------------------------------
898-
899- If you already have license files and metadata in your project, you
900- should only need to make a couple of tweaks to take advantage of the new
901- functionality.
902-
903- In your project config file, enter your license expression under
904- ``license-expression `` (:pep: `621 ` ``pyproject.toml ``), ``license_expression ``
905- (Setuptools ``setup.cfg `` / ``setup.py ``), or the equivalent for your
906- packaging tool, and make sure to remove any legacy ``license `` value or
907- ``License :: `` classifiers. Your existing ``license `` value may already
908- be valid as one (e.g. ``MIT ``, ``Apache-2.0 OR BSD-2-Clause ``, etc);
909- otherwise, check the `SPDX license list <#spdxlist _>`_ for the identifier
910- that matches the license used in your project.
911-
912- If your license files begin with ``LICENSE ``, ``COPYING ``, ``NOTICE `` or
913- ``AUTHORS ``, or you've already configured your packaging tool to add them
914- (e.g. ``license_files `` in ``setup.cfg ``), you should already be good to go.
915- If not, make sure to list them under ``license-files.paths ``
916- or ``license-files.globs `` under ``[project] `` in ``pyproject.toml ``
917- (if your tool supports it), or else in your tool's configuration file
918- (e.g. ``license_files `` in ``setup.cfg `` for Setuptools).
919-
920- See the `basic example `_ for a simple but complete real-world demo of how
921- this works in practice, including some additional technical details.
922- Packaging tools may support automatically converting legacy licensing
923- metadata; check your tool's documentation for more information.
924-
925-
926- My package includes other code under different licenses
927- -------------------------------------------------------
928-
929- If your project includes code from others covered by different licenses,
930- such as vendored dependencies or files copied from other open source
931- software, you can construct a license expression (or have a tool
932- help you do so) to describe the licenses involved and the relationship
933- between them.
934-
935- In short, ``License-1 AND License-2 `` mean that *both * licenses apply
936- to your project, or parts of it (for example, you included a file
937- under another license), and ``License-1 OR License-2 `` means that
938- *either * of the licenses can be used, at the user's option (for example,
939- you want to allow users a choice of multiple licenses). You can use
940- parenthesis (``() ``) for grouping to form expressions that cover even the most
941- complex situations.
942-
943- In your project config file, enter your license expression under
944- ``license-expression `` (:pep: `621 ` ``pyproject.toml ``), ``license_expression ``
945- (Setuptools ``setup.cfg `` / ``setup.py ``), or the equivalent for your
946- packaging tool, and make sure to remove any legacy ``license `` value or
947- ``License :: `` classifiers.
948-
949- Also, make sure you add the full license text of all the licenses as files
950- somewhere in your project repository. If all of them are in the root directory
951- and begin with ``LICENSE ``, ``COPYING ``, ``NOTICE `` or ``AUTHORS ``,
952- they will be included automatically. Otherwise, you'll need to list the
953- relative path or glob patterns to each of them under ``license-files.paths ``
954- or ``license-files.globs `` under ``[project] `` in ``pyproject.toml ``
955- (if your tool supports it), or else in your tool's configuration file
956- (e.g. ``license_files `` in ``setup.cfg `` for Setuptools).
957-
958- As an example, if your project was licensed MIT but incorporated
959- a vendored dependency (say, ``packaging ``) that was licensed under
960- either Apache 2.0 or the 2-clause BSD, your license expression would
961- be ``MIT AND (Apache-2.0 OR BSD-2-Clause) ``. You might have a
962- ``LICENSE.txt `` in your repo root, and a ``LICENSE-APACHE.txt `` and
963- ``LICENSE-BSD.txt `` in the ``_vendor `` subdirectory, so to include
964- all of them, you'd specify ``["LICENSE.txt", "_vendor/packaging/LICENSE*"] ``
965- as glob patterns, or
966- ``["LICENSE.txt", "_vendor/LICENSE-APACHE.txt", "_vendor/LICENSE-BSD.txt"] ``
967- as literal file paths.
968-
969- See a fully worked out `advanced example `_ for a comprehensive end-to-end
970- application of this to a real-world complex project, with copious technical
971- details, and consult a `tutorial <#spdxtutorial _>`_ for more help and examples
972- using SPDX identifiers and expressions.
973-
974-
975838Backwards Compatibility
976839=======================
977840
@@ -2066,8 +1929,8 @@ compatibility, while the same is not so if they are allowed now and later
20661929determined to be unnecessary or too problematic in practice.
20671930
20681931
2069- Appendix 1. License Expression Examples
2070- =======================================
1932+ Appendix: License Expression Examples
1933+ =====================================
20711934
20721935Basic example
20731936-------------
@@ -2258,8 +2121,145 @@ Some additional examples of valid ``License-Expression`` values::
22582121 License-Expression: LicenseRef-Proprietary
22592122
22602123
2261- Appendix 2. License Documentation in Python
2262- ===========================================
2124+ Appendix: User Scenarios
2125+ ========================
2126+
2127+ The following covers the range of common use cases from a user perspective,
2128+ providing straightforward guidance for each. Do note that the following
2129+ should **not ** be considered legal advice, and readers should consult a
2130+ licensed attorney if they are unsure about the specifics for their situation.
2131+
2132+
2133+ I have a private package that won't be distributed
2134+ --------------------------------------------------
2135+
2136+ If your package isn't shared publicly, i.e. outside your company,
2137+ organization or household, it *usually * isn't strictly necessary to include
2138+ a formal license, so you wouldn't necessarily have to do anything extra here.
2139+
2140+ However, it is still a good idea to include ``LicenseRef-Proprietary ``
2141+ as a license expression in your package configuration, and/or a
2142+ copyright statement and any legal notices in a ``LICENSE.txt `` file
2143+ in the root of your project directory, which will be automatically
2144+ included by packaging tools.
2145+
2146+
2147+ I just want to share my own work without legal restrictions
2148+ -----------------------------------------------------------
2149+
2150+ While you aren't required to include a license, if you don't, no one has
2151+ `any permission to download, use or improve your work <#dontchoosealicense _>`_,
2152+ so that's probably the *opposite * of what you actually want.
2153+ The `MIT license <#mitlicense _>`_ is a great choice instead, as it's simple,
2154+ widely used and allows anyone to do whatever they want with your work
2155+ (other than sue you, which you probably also don't want).
2156+
2157+ To apply it, just paste `the text <#chooseamitlicense _>`_ into a file named
2158+ ``LICENSE.txt `` at the root of your repo, and add the year and your name to
2159+ the copyright line. Then, just add ``license-expression = "MIT" `` under
2160+ ``[project] `` in your ``pyproject.toml `` if your packaging tool supports it,
2161+ or in its config file/section (e.g. Setuptools ``license_expression = MIT ``
2162+ under ``[metadata] `` in ``setup.cfg ``). You're done!
2163+
2164+
2165+ I want to distribute my project under a specific license
2166+ --------------------------------------------------------
2167+
2168+ To use a particular license, simply paste its text into a ``LICENSE.txt ``
2169+ file at the root of your repo, if you don't have it in a file starting with
2170+ ``LICENSE `` or ``COPYING `` already, and add
2171+ ``license-expression = "LICENSE-ID" `` under ``[project] `` in your
2172+ ``pyproject.toml `` if your packaging tool supports it, or else in its
2173+ config file (e.g. for Setuptools, ``license_expression = LICENSE-ID ``
2174+ under ``[metadata] `` in ``setup.cfg ``). You can find the ``LICENSE-ID ``
2175+ and copyable license text on sites like
2176+ `ChooseALicense <#choosealicenselist _>`_ or `SPDX <#spdxlist _>`_.
2177+
2178+ Many popular code hosts, project templates and packaging tools can add the
2179+ license file for you, and may support the expression as well in the future.
2180+
2181+
2182+ I maintain an existing package that's already licensed
2183+ ------------------------------------------------------
2184+
2185+ If you already have license files and metadata in your project, you
2186+ should only need to make a couple of tweaks to take advantage of the new
2187+ functionality.
2188+
2189+ In your project config file, enter your license expression under
2190+ ``license-expression `` (:pep: `621 ` ``pyproject.toml ``), ``license_expression ``
2191+ (Setuptools ``setup.cfg `` / ``setup.py ``), or the equivalent for your
2192+ packaging tool, and make sure to remove any legacy ``license `` value or
2193+ ``License :: `` classifiers. Your existing ``license `` value may already
2194+ be valid as one (e.g. ``MIT ``, ``Apache-2.0 OR BSD-2-Clause ``, etc);
2195+ otherwise, check the `SPDX license list <#spdxlist _>`_ for the identifier
2196+ that matches the license used in your project.
2197+
2198+ If your license files begin with ``LICENSE ``, ``COPYING ``, ``NOTICE `` or
2199+ ``AUTHORS ``, or you've already configured your packaging tool to add them
2200+ (e.g. ``license_files `` in ``setup.cfg ``), you should already be good to go.
2201+ If not, make sure to list them under ``license-files.paths ``
2202+ or ``license-files.globs `` under ``[project] `` in ``pyproject.toml ``
2203+ (if your tool supports it), or else in your tool's configuration file
2204+ (e.g. ``license_files `` in ``setup.cfg `` for Setuptools).
2205+
2206+ See the `basic example `_ for a simple but complete real-world demo of how
2207+ this works in practice, including some additional technical details.
2208+ Packaging tools may support automatically converting legacy licensing
2209+ metadata; check your tool's documentation for more information.
2210+
2211+
2212+ My package includes other code under different licenses
2213+ -------------------------------------------------------
2214+
2215+ If your project includes code from others covered by different licenses,
2216+ such as vendored dependencies or files copied from other open source
2217+ software, you can construct a license expression (or have a tool
2218+ help you do so) to describe the licenses involved and the relationship
2219+ between them.
2220+
2221+ In short, ``License-1 AND License-2 `` mean that *both * licenses apply
2222+ to your project, or parts of it (for example, you included a file
2223+ under another license), and ``License-1 OR License-2 `` means that
2224+ *either * of the licenses can be used, at the user's option (for example,
2225+ you want to allow users a choice of multiple licenses). You can use
2226+ parenthesis (``() ``) for grouping to form expressions that cover even the most
2227+ complex situations.
2228+
2229+ In your project config file, enter your license expression under
2230+ ``license-expression `` (:pep: `621 ` ``pyproject.toml ``), ``license_expression ``
2231+ (Setuptools ``setup.cfg `` / ``setup.py ``), or the equivalent for your
2232+ packaging tool, and make sure to remove any legacy ``license `` value or
2233+ ``License :: `` classifiers.
2234+
2235+ Also, make sure you add the full license text of all the licenses as files
2236+ somewhere in your project repository. If all of them are in the root directory
2237+ and begin with ``LICENSE ``, ``COPYING ``, ``NOTICE `` or ``AUTHORS ``,
2238+ they will be included automatically. Otherwise, you'll need to list the
2239+ relative path or glob patterns to each of them under ``license-files.paths ``
2240+ or ``license-files.globs `` under ``[project] `` in ``pyproject.toml ``
2241+ (if your tool supports it), or else in your tool's configuration file
2242+ (e.g. ``license_files `` in ``setup.cfg `` for Setuptools).
2243+
2244+ As an example, if your project was licensed MIT but incorporated
2245+ a vendored dependency (say, ``packaging ``) that was licensed under
2246+ either Apache 2.0 or the 2-clause BSD, your license expression would
2247+ be ``MIT AND (Apache-2.0 OR BSD-2-Clause) ``. You might have a
2248+ ``LICENSE.txt `` in your repo root, and a ``LICENSE-APACHE.txt `` and
2249+ ``LICENSE-BSD.txt `` in the ``_vendor `` subdirectory, so to include
2250+ all of them, you'd specify ``["LICENSE.txt", "_vendor/packaging/LICENSE*"] ``
2251+ as glob patterns, or
2252+ ``["LICENSE.txt", "_vendor/LICENSE-APACHE.txt", "_vendor/LICENSE-BSD.txt"] ``
2253+ as literal file paths.
2254+
2255+ See a fully worked out `advanced example `_ for a comprehensive end-to-end
2256+ application of this to a real-world complex project, with copious technical
2257+ details, and consult a `tutorial <#spdxtutorial _>`_ for more help and examples
2258+ using SPDX identifiers and expressions.
2259+
2260+
2261+ Appendix: License Documentation in Python
2262+ =========================================
22632263
22642264There are multiple ways used or recommended to document Python project
22652265licenses today. The most common are listed below.
@@ -2384,8 +2384,8 @@ Other Python packaging tools
23842384 ``pyproject.toml `` with SPDX license identifiers.
23852385
23862386
2387- Appendix 3. License Documentation in Other Projects
2388- ===================================================
2387+ Appendix: License Documentation in Other Projects
2388+ =================================================
23892389
23902390Here is a survey of how things are done elsewhere.
23912391
0 commit comments