-
Notifications
You must be signed in to change notification settings - Fork 72
Remove "License :: ..." classifiers from pyproject.toml examples #564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
363d570
Remove "License :: ..." classifiers from pyproject.toml examples
tomalrussell 3e57a98
Rewording description of license metadata
tomalrussell f6e23a3
Drop "License" from classifier suggestions on pyproject.toml guide page
tomalrussell 41a9d7e
Fix missing word
tomalrussell 89a2332
Fix white space
tomalrussell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,8 +272,8 @@ you want to have listed as authors and maintainers on your PyPI landing page. | |
### Step 2: Add README and license | ||
|
||
In the previous lessons, you added both a [README.md](add-readme) file and a [LICENSE](add-license-coc) to your package repository. | ||
Once you have those files, you can add them to your pyproject.toml file as | ||
links following the example below. | ||
Once you have those files, you can refer to the README from your pyproject.toml file, and add a short code indicating your choice of LICENSE | ||
following the example below. | ||
|
||
{emphasize-lines="20-21"} | ||
```toml | ||
|
@@ -297,8 +297,15 @@ maintainers = [ | |
{ name = "New Friend", email = "[email protected]" } | ||
] | ||
readme = "README.md" | ||
license = {file = "LICENSE"} | ||
license = "MIT" | ||
``` | ||
|
||
The license entry in your pyproject.toml file must use the [license expression syntax](https://packaging.python.org/en/latest/specifications/license-expression/). Often this is a short name (with no spaces) for the license, such as "MIT", "BSD-3-Clause" or "Apache-2.0". More precisely, it must be a valid SPDX license expression, as documented in the [SPDX specification](https://spdx.github.io/spdx-spec/v2.2.2/SPDX-license-expressions/), either version 2.2 or a later compatible version. | ||
|
||
If you have multiple licenses, or a custom license, you can also express these using a license expression. | ||
|
||
If you want to distribute license files, or other files containing legal information, with your package, you can include these using the [`license-files`](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-files) entry, but this is not required. | ||
|
||
### Step 3: Specify Python version with `requires-python` | ||
|
||
Add the `requires-python` field to your `pyproject.toml` `[project]` table. | ||
|
@@ -337,7 +344,7 @@ maintainers = [ | |
{ name = "New Friend", email = "[email protected]" } | ||
] | ||
readme = "README.md" | ||
license = {file = 'LICENSE'} | ||
license = "MIT" | ||
requires-python = ">=3.10" | ||
``` | ||
|
||
|
@@ -409,7 +416,7 @@ maintainers = [ | |
{ name = "New Friend", email = "[email protected]" } | ||
] | ||
readme = "README.md" | ||
license = {file = 'LICENSE'} | ||
license = "MIT" | ||
requires-python = ">=3.10" | ||
|
||
dependencies = ["numpy>=1.0", "requests==10.1", "pandas", "pydantic>=1.7,<2"] | ||
|
@@ -454,12 +461,11 @@ Review that list and add items below to your `pyproject.toml` file: | |
- development status | ||
- intended audiences | ||
- topic | ||
- license and | ||
- programming language support | ||
|
||
The classifier key should look something like the example below. A few notes: | ||
|
||
- Your classifier values might be different depending upon the license you have selected for your package, your intended audience, development status of your package and the Python versions that you support | ||
- Your classifier values might be different depending upon your intended audience, development status of your package and the Python versions that you support | ||
- You can add as many classifiers as you wish as long as you use the [designated PyPI classifier values](https://PyPI.org/classifiers/). | ||
|
||
{emphasize-lines="26-34"} | ||
|
@@ -484,7 +490,7 @@ maintainers = [ | |
{ name = "New Friend", email = "[email protected]" } | ||
] | ||
readme = "README.md" | ||
license = {file = 'LICENSE'} | ||
license = "MIT" | ||
requires-python = ">=3.10" | ||
|
||
dependencies = ["numpy>=1.0", "requests==10.1", "pandas", "pydantic>=1.7,<2"] | ||
|
@@ -493,7 +499,6 @@ classifiers = [ | |
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Build Tools", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
|
@@ -534,7 +539,7 @@ maintainers = [ | |
{ name = "New Friend", email = "[email protected]" } | ||
] | ||
readme = "README.md" | ||
license = {file = 'LICENSE'} | ||
license = "MIT" | ||
requires-python = ">=3.10" | ||
|
||
dependencies = ["numpy>=1.0", "requests==10.1", "pandas", "pydantic>=1.7,<2"] | ||
|
@@ -543,7 +548,6 @@ classifiers = [ | |
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Build Tools", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
|
@@ -585,7 +589,7 @@ maintainers = [ | |
{ name = "New Friend", email = "[email protected]" } | ||
] | ||
readme = "README.md" | ||
license = {file = 'LICENSE'} | ||
license = "MIT" | ||
requires-python = ">=3.10" | ||
|
||
dependencies = ["numpy>=1.0", "requests==10.1", "pandas", "pydantic>=1.7,<2"] | ||
|
@@ -594,7 +598,6 @@ classifiers = [ | |
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Build Tools", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
|
@@ -650,9 +653,6 @@ classifiers = [ | |
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Build Tools", | ||
|
||
# Pick your license (using syntax from the classifier page). We suggest MIT, BSD3 or Apache if you are corporate | ||
"License :: OSI Approved :: MIT License", | ||
|
||
# Specify the Python versions ensuring that you indicate you support Python 3. | ||
# this is only for PyPI and other metadata associated with your package - for your users to see | ||
"Programming Language :: Python :: 3 :: Only", # BE sure to specify that you use python 3.x | ||
|
@@ -665,7 +665,11 @@ dependencies = ["numpy>=1.0", "requests==10.1", "pandas", "pydantic>=1.7,<2"] | |
# This is the metadata that pip reads to understand what versions your package supports | ||
requires-python = ">=3.10" | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
|
||
# Pick your license using license expression syntax specified here: | ||
tomalrussell marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
# https://packaging.python.org/en/latest/specifications/license-expression/ | ||
# We suggest MIT, BSD-3-Clause or Apache-2.0 | ||
license = "MIT" | ||
|
||
# Add urls for your home page, issue tracker and source code | ||
[project.urls] # Optional | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.