Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions calculate-liam/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ build-backend = "hatchling.build"

[project]
name = "calculate-liam"
version = "0.0.8"
version = "0.0.9"
dependencies = ["click", "numpy"]
authors = [
{ name="Liam Keegan", email="liam@keegan.ch" },
]
license = "MIT"
license-files = ["LICENSE.md"]
description = "An example package from the SSC Python Packaging course"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

Expand Down
29 changes: 13 additions & 16 deletions slides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ pip install -e .
pyproject.toml # defines how to install the package
README.md # all projects should have a readme
LICENSE # all projects should have a license
LICENSE.md # all projects should have a license
```

---
Expand Down Expand Up @@ -748,38 +748,35 @@ authors = [
]
description = "A simple package to flip a coin or roll dice"
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
license = "MIT"
license-files = ["LICENSE.md"]
...
```

---

# License in pyproject.toml
# Licenses in pyproject.toml

We specified our license using a classifier (see [pypi.org/classifiers](https://pypi.org/classifiers/)):
We specified our license using the [SPDX identifier](https://spdx.org/licenses/) "MIT" and pointed to the license file:

```toml
[project]
classifiers = [..., "License :: OSI Approved :: MIT License", ...]
license = "MIT"
license-files = ["LICENSE.md"]
```

This is the preferred method if there is a classifier available for your license.
This is the current recommended way to specify the license (see [PEP 639](https://peps.python.org/pep-0639)).

Alternatively you can instead point to your license file:
Here are some older (deprecated) alternatives you may see:

```toml
[project]
license = { file = "LICENSE.txt" }
classifiers = [..., "License :: OSI Approved :: MIT License", ...]
```

Or simply provide the license as plain text:
```toml
license = { file = "LICENSE.txt" }
```

```toml
[project]
license = { text = "MIT" }
```

Expand Down
Loading