Skip to content

Commit 1c4dab6

Browse files
committed
Improve pyproject and build process
1 parent 6b07409 commit 1c4dab6

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ jobs:
3636
- name: Install dependencies
3737
run: |
3838
python -m pip install -U pip
39-
python -m pip install -U setuptools twine wheel
39+
python -m pip install -U build twine
40+
pip install .[dev]
4041
4142
- name: Build package
4243
run: |
43-
python setup.py --version
44-
python setup.py sdist --format=gztar bdist_wheel
44+
python -m build
4545
twine check dist/*
4646
4747
- name: Upload packages to Jazzband

.github/workflows/test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ jobs:
3838
3939
- name: Install dependencies
4040
run: |
41-
python -m pip install --upgrade pip
42-
python -m pip install -r requirements.txt
41+
python -m pip install -U pip
42+
python -m pip install -U build twine
43+
pip install .[dev]
4344
4445
- name: Tests
4546
run: |
@@ -50,6 +51,11 @@ jobs:
5051
with:
5152
name: Python ${{ matrix.python-version }}
5253

54+
- name: Test build package
55+
run: |
56+
python -m build
57+
twine check dist/*
58+
5359
success:
5460
needs: test
5561
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
15
[project]
26
name = "jsonmodels"
37
version = "2.7.0"
@@ -11,11 +15,11 @@ classifiers=[
1115
"License :: OSI Approved :: BSD License",
1216
"Natural Language :: English",
1317
"Programming Language :: Python :: 3",
14-
"Programming Language :: Python :: 3.8",
15-
"Programming Language :: Python :: 3.9",
1618
"Programming Language :: Python :: 3.10",
1719
"Programming Language :: Python :: 3.11",
1820
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
22+
"Programming Language :: Python :: 3.14",
1923
"Programming Language :: Python :: 3 :: Only",
2024
]
2125
authors = [
@@ -41,9 +45,6 @@ dev = [
4145
"pytest",
4246
"pytest-cov",
4347
"sphinxcontrib-spelling",
44-
"tox",
45-
"virtualenv",
46-
"wheel",
4748
]
4849

4950
[project.urls]
@@ -56,7 +57,3 @@ max_line_length = 88
5657

5758
[tool.isort]
5859
profile = "black"
59-
60-
[build-system]
61-
requires = ["setuptools>=43.0.0", "wheel"]
62-
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)