@@ -71,7 +71,8 @@ description = "A short description of the package."
7171
7272### license
7373
74- The license of the package.
74+ An [ SPDX expression] ( https://packaging.python.org/en/latest/glossary/#term-License-Expression )
75+ representing the license of the package.
7576
7677The recommended notation for the most common licenses is (alphabetical):
7778
@@ -93,20 +94,43 @@ Optional, but it is highly recommended to supply this.
9394More identifiers are listed at the [ SPDX Open Source License Registry] ( https://spdx.org/licenses/ ) .
9495
9596``` toml
96- license = { text = " MIT" }
97+ license = " MIT"
9798```
98- {{% note %}}
99- If your project is proprietary and does not use a specific license, you can set this value as ` Proprietary ` .
100- {{% /note %}}
10199
102- You can also specify a license file. However, when doing this, the complete license text
103- will be added to the metadata and the License classifier cannot be determined
104- automatically so that you have to add it manually.
100+ {{% warning %}}
101+ Specifying license as a table, e.g. ` { text = "MIT" } ` is deprecated.
102+ If you used to specify a license file, e.g. ` { file = "LICENSE" } ` ,
103+ use ` license-files ` instead.
104+ {{% /warning %}}
105+
106+ ### license-files
107+
108+ A list of glob patterns that match the license files of the package
109+ relative to the root of the project source tree.
105110
106111``` toml
107- license = { file = " LICENSE" }
112+ [project ]
113+ # ...
114+ license-files = [
115+ " *-LICENSE" ,
116+ " CONTRIBUTORS" ,
117+ " MY-SPECIAL-LICENSE-DIR/**/*"
118+ ]
108119```
109120
121+ By default, Poetry will include the following files:
122+ - ` LICENSE* `
123+ - ` LICENCE* `
124+ - ` COPYING* `
125+ - ` AUTHORS* `
126+ - ` NOTICE* `
127+ - ` LICENSES/**/* `
128+
129+ {{% note %}}
130+ The default applies only if the ` license-files ` field is not specified.
131+ Specifying an empty list results in no license files being included.
132+ {{% /note %}}
133+
110134### readme
111135
112136A path to the README file or the content.
@@ -198,7 +222,7 @@ classifiers = [
198222```
199223
200224{{% warning %}}
201- Note that suitable classifiers based on your ` python ` requirement and ` license `
225+ Note that suitable classifiers based on your ` python ` requirement
202226are ** not** automatically added for you if you define classifiers statically
203227in the ` project ` section.
204228
@@ -419,9 +443,6 @@ More identifiers are listed at the [SPDX Open Source License Registry](https://s
419443``` toml
420444license = " MIT"
421445```
422- {{% note %}}
423- If your project is proprietary and does not use a specific licence, you can set this value as ` Proprietary ` .
424- {{% /note %}}
425446
426447### authors
427448
@@ -545,11 +566,8 @@ classifiers = [
545566Note that Python classifiers are automatically added for you
546567and are determined by your ` python ` requirement.
547568
548- The ` license ` property will also set the License classifier automatically.
549-
550569If you do not want Poetry to automatically add suitable classifiers
551- based on the ` python ` requirement and ` license ` property,
552- use ` project.classifiers ` instead of this setting.
570+ based on the ` python ` requirement, use ` project.classifiers ` instead of this setting.
553571{{% /note %}}
554572
555573### packages
0 commit comments