Commit fef00f6
committed
Migrated setup.py -> pyproject.toml with Hatchling
Most of the changes to `pyproject.toml` were made by running
`hatch new --init` (see
https://hatch.pypa.io/latest/intro/#existing-project).
Most of the changes to the other files were based on the changes made in
django-commons/django-debug-toolbar#1690.
### `release.yml`:
* `hatch version` is run instead of `hatchling version` (as is done in
the PR mentioned above), as the latter crashes with the error:
```
hatchling.plugin.exceptions.UnknownPluginError: Unknown version source: vcs
```
Installing `hatch` takes considerably longer than just `hatchling`,
but I think it's still acceptable.
* Updated the `pypa/gh-action-pypi-publish` action from the sunset
`master` branch to `release/v1`; see warning at
https://github.com/jazzband/django-simple-history/actions/runs/9246937361.
Also replaced the deprecated `repository_url` with `repository-url`; see
https://github.com/pypa/gh-action-pypi-publish/blob/v1.8.14/action.yml#L15
### `.pre-commit-config.yaml`:
* Added some pre-commit hooks for formatting and validating
`pyproject.toml`
### `MANIFEST.in`:
* Removed `MANIFEST.in`, as the default
`[tool.hatch.build.targets.sdist]` configuration (in `pyproject.toml`)
includes all files not ignored through our `.gitignore`; see
https://hatch.pypa.io/latest/plugins/builder/sdist/#default-file-selection
### `pyproject.toml`:
* Didn't include the `license` field, as the docs recommend using a
`License ::` classifier instead - see
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
* The classifier "Programming Language :: Python :: 3"
was changed to "Programming Language :: Python :: 3 :: Only"
by the `pyproject-fmt` pre-commit hook
* Set `core-metadata-version = "2.2"` (copied from
django-commons/django-debug-toolbar#1916) due to
jazzband/help#360
* Didn't include the last 3 packages from the `packages` kwarg in
`setup.py` when configuring `[tool.hatch.build.targets.wheel]`, since
they don't make any difference in the generated wheel, as having just
`simple_history` will include all its subpackages
* As part of porting long_description's file concatenation from
`setup.py`, `hatch-fancy-pypi-readme` was added to `requires` and
configured to concatenate the same files - except with the first title
of `README.rst` and the "Unreleased" section of `CHANGES.rst` removed
(facilitated by the added "Start of PyPI readme" comments in those two
files)1 parent cf6848c commit fef00f6
File tree
9 files changed
+113
-72
lines changed- .github/workflows
9 files changed
+113
-72
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
41 | 51 | | |
42 | 52 | | |
43 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
1 | 76 | | |
2 | 77 | | |
3 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
4 | 81 | | |
5 | 82 | | |
6 | 83 | | |
| |||
9 | 86 | | |
10 | 87 | | |
11 | 88 | | |
12 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
13 | 92 | | |
14 | 93 | | |
15 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
16 | 98 | | |
17 | 99 | | |
18 | 100 | | |
19 | 101 | | |
20 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments