You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: package-structure-code/python-package-distribution-files-sdist-wheel.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ dependencies = [
53
53
54
54
2. When the build tool creates your package distribution file (the file that you publish on PyPI), it also creates a METADATA file which PyPI can read and use to help users find your package. For example:
55
55
56
-
- The `classifiers = ` section of your `[project]` table in the pyproject.toml file provides information that users on PyPI can use to filter for packages that contain specific licenses or that support specific versions of python.
56
+
- The `classifiers = ` section of your `[project]` table in the pyproject.toml file provides information that users on PyPI can use to filter for packages that address different topics or that support specific versions of python.
Copy file name to clipboardExpand all lines: tutorials/add-license-coc.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,13 +26,13 @@ In this lesson you will learn:
26
26
A license contains legal language about how users can use and reuse your software. To set the `LICENSE` for your project, you:
27
27
28
28
1. Create a `LICENSE` file in your project directory that specifies the license that you choose for your package.
29
-
2.Reference that file in your `pyproject.toml` data where metadata are set.
29
+
2.Describe your choice of license in your `pyproject.toml` data where metadata are set.
30
30
31
-
By adding the `LICENSE` file to your `pyproject.toml` file, the `LICENSE`will be included in your package's metadata which is used to populate your package's PyPI landing page. The `LICENSE` is also used in your GitHub repository's landing page interface.
31
+
By adding this metadata to your `pyproject.toml` file, the choice of license will be included in your package's metadata which is used to populate your package's PyPI landing page. The `LICENSE` file is also used in your GitHub repository's landing page interface.
32
32
33
33
### What license should you use?
34
34
35
-
We suggest that you use a permissive license that accommodates the other most commonly used licenses in the scientific Python ecosystem (MIT[^mit] and BSD-3[^bsd3]). If you are unsure, use MIT given it's the generally recommended
35
+
We suggest that you use a permissive license that accommodates the other most commonly used licenses in the scientific Python ecosystem (MIT[^mit] and BSD-3-Clause[^bsd3]). If you are unsure, use MIT given it's the generally recommended
36
36
license on [choosealicense.com](https://choosealicense.com/).
37
37
38
38
:::{admonition} Licenses for the scientific Python ecosystem
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.
304
+
305
+
If you have multiple licenses, or a custom license, you can also express these using a license expression.
306
+
307
+
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.
308
+
302
309
### Step 3: Specify Python version with `requires-python`
303
310
304
311
Add the `requires-python` field to your `pyproject.toml``[project]` table.
@@ -454,12 +461,11 @@ Review that list and add items below to your `pyproject.toml` file:
454
461
- development status
455
462
- intended audiences
456
463
- topic
457
-
- license and
458
464
- programming language support
459
465
460
466
The classifier key should look something like the example below. A few notes:
461
467
462
-
- 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
468
+
- Your classifier values might be different depending upon your intended audience, development status of your package and the Python versions that you support
463
469
- You can add as many classifiers as you wish as long as you use the [designated PyPI classifier values](https://PyPI.org/classifiers/).
0 commit comments