Skip to content

Commit 35c540e

Browse files
committed
Update package metadata
1 parent 3854269 commit 35c540e

File tree

9 files changed

+81
-73
lines changed

9 files changed

+81
-73
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ jobs:
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install -U pip
27-
python -m pip install -U setuptools twine wheel
27+
python -m pip install -U build twine
2828
2929
- name: Build package
3030
run: |
31-
python setup.py --version
32-
python setup.py sdist --format=gztar bdist_wheel
31+
python -m build
3332
twine check dist/*
3433
3534
- name: Upload packages to Jazzband

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
python-version: ${{ matrix.python-version }}
7474
cache: 'pip'
7575
cache-dependency-path: |
76-
setup.py
76+
pyproject.toml
7777
tox.ini
7878
requirements/*.txt
7979

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ Authors
109109
- Nianpeng Li
110110
- Nick Träger
111111
- Noel James (`NoelJames <https://github.com/NoelJames>`_)
112+
- Ofek Lev (`ofek <https://github.com/ofek>`_)
112113
- Phillip Marshall
113114
- Prakash Venkatraman (`dopatraman <https://github.com/dopatraman>`_)
114115
- Rajesh Pappula

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changes
44
Unreleased
55
----------
66

7+
- Update package metadata to use modern standards
8+
79

810
3.6.0 (2024-05-26)
911
------------------

MANIFEST.in

Lines changed: 0 additions & 6 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ clean: clean-build clean-pyc
44
rm -fr htmlcov/
55

66
clean-build:
7-
rm -fr build/
87
rm -fr dist/
9-
rm -fr *.egg-info
108

119
clean-pyc:
1210
find . -name '*.pyc' -exec rm -f {} +
@@ -27,9 +25,8 @@ documentation:
2725
tox -e docs
2826

2927
dist: clean
30-
pip install -U wheel
31-
python setup.py sdist
32-
python setup.py bdist_wheel
28+
pip install -U build
29+
python -m build
3330
for file in dist/* ; do gpg --detach-sign -a "$$file" ; done
3431
ls -l dist
3532

pyproject.toml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,73 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "django-simple-history"
7+
dynamic = ["version", "readme"]
8+
description = "Store model history and view/revert changes from admin site."
9+
license = "BSD-3-Clause"
10+
requires-python = ">=3.8"
11+
authors = [
12+
{ name = "Corey Bertram", email = "[email protected]" },
13+
]
14+
maintainers = [
15+
{ name = "Trey Hunner" },
16+
]
17+
classifiers = [
18+
"Development Status :: 5 - Production/Stable",
19+
"Environment :: Web Environment",
20+
"Framework :: Django",
21+
"Framework :: Django",
22+
"Framework :: Django :: 3.2",
23+
"Framework :: Django :: 4.2",
24+
"Framework :: Django :: 5.0",
25+
"Intended Audience :: Developers",
26+
"License :: OSI Approved :: BSD License",
27+
"Programming Language :: Python",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.9",
31+
"Programming Language :: Python :: 3.10",
32+
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
34+
"Programming Language :: Python :: 3.13",
35+
]
36+
# DEV: Remove `asgiref` when the minimum required Django version is 4.2
37+
dependencies = ["asgiref>=3.6"]
38+
39+
[project.urls]
40+
Changelog = "https://github.com/jazzband/django-simple-history/blob/master/CHANGES.rst"
41+
Documentation = "https://django-simple-history.readthedocs.io/"
42+
Source = "https://github.com/jazzband/django-simple-history"
43+
Tracker = "https://github.com/jazzband/django-simple-history/issues"
44+
45+
[tool.hatch.version]
46+
source = "vcs"
47+
48+
[tool.hatch.version.raw-options]
49+
version_scheme = "post-release"
50+
local_scheme = "node-and-date"
51+
fallback_version = "0.0.0"
52+
53+
[tool.hatch.metadata.hooks.fancy-pypi-readme]
54+
content-type = "text/x-rst"
55+
fragments = [
56+
{ path = "README.rst" },
57+
{ path = "CHANGES.rst" },
58+
]
59+
60+
[tool.hatch.build.targets.wheel]
61+
packages = ["simple_history"]
62+
63+
[tool.hatch.build.targets.sdist]
64+
include = [
65+
"/docs",
66+
"/simple_history",
67+
"*.rst",
68+
"*.txt",
69+
]
70+
171
[tool.black]
272
line-length = 88
373
target-version = ["py38"]

setup.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[tox]
2+
isolated_build = true
23
envlist =
34
py{38,39,310}-dj32-{sqlite3,postgres,mysql,mariadb},
45
py{38,39,310,311,312}-dj42-{sqlite3,postgres,mysql,mariadb},
@@ -53,8 +54,8 @@ commands =
5354
[testenv:format]
5455
deps = -rrequirements/lint.txt
5556
commands =
56-
isort docs simple_history runtests.py setup.py
57-
black docs simple_history runtests.py setup.py
57+
isort docs simple_history runtests.py
58+
black docs simple_history runtests.py
5859
flake8 simple_history
5960

6061
[testenv:lint]

0 commit comments

Comments
 (0)