Skip to content

Commit 83a0ae7

Browse files
authored
Replace setup.py with pyproject.toml (#824)
1 parent 1e8bfa8 commit 83a0ae7

File tree

7 files changed

+81
-64
lines changed

7 files changed

+81
-64
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install -U pip
26-
python -m pip install -U setuptools twine wheel
26+
python -m pip install -U twine build setuptools-scm
2727
2828
- name: Build package
2929
run: |
30-
python setup.py --version
31-
python setup.py sdist --format=gztar bdist_wheel
32-
twine check dist/*
30+
python -m setuptools_scm
31+
python -m build
32+
twine check --strict dist/*
3333
3434
- name: Upload packages to Jazzband
3535
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
with:
5757
path: ${{ steps.pip-cache.outputs.dir }}
5858
key:
59-
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
59+
${{ matrix.python-version }}-v1-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/tox.ini') }}
6060
restore-keys: |
6161
${{ matrix.python-version }}-v1-
6262

.readthedocs.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,3 @@ build:
1111

1212
sphinx:
1313
configuration: docs/conf.py
14-
15-
python:
16-
install:
17-
- requirements: requirements.txt
18-
- method: pip
19-
path: .

pyproject.toml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,79 @@
1+
[build-system]
2+
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "django-pipeline"
7+
requires-python = ">=3.9"
8+
version = "3.1.0"
9+
description = "Pipeline is an asset packaging library for Django."
10+
readme = "README.rst"
11+
authors = [{ "name" = "Timothée Peignier", "email" = "[email protected]" }]
12+
license = { text = "MIT" }
13+
classifiers = [
14+
"Development Status :: 5 - Production/Stable",
15+
"Environment :: Web Environment",
16+
"Framework :: Django",
17+
"Framework :: Django :: 4.0",
18+
"Framework :: Django :: 4.1",
19+
"Framework :: Django :: 4.2",
20+
"Framework :: Django :: 5.0",
21+
"Framework :: Django :: 5.1",
22+
"Intended Audience :: Developers",
23+
"License :: OSI Approved :: MIT License",
24+
"Operating System :: OS Independent",
25+
"Programming Language :: Python",
26+
"Programming Language :: Python :: 3",
27+
"Programming Language :: Python :: 3 :: Only",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: Implementation :: PyPy",
33+
"Topic :: Utilities",
34+
"Topic :: Software Development :: Libraries :: Python Modules",
35+
"Topic :: Internet :: WWW/HTTP",
36+
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
37+
]
38+
keywords = [
39+
"django",
40+
"pipeline",
41+
"asset",
42+
"compiling",
43+
"concatenation",
44+
"compression",
45+
"packaging",
46+
]
47+
dependencies = [
48+
# indirect dependencies
49+
"setuptools", # typically needed when pip-tools invokes setup.py
50+
"wheel", # pip plugin needed by pip-tools
51+
52+
]
53+
54+
[project.optional-dependencies]
55+
testing = [
56+
"coveralls",
57+
"tox",
58+
"wheel",
59+
"django",
60+
]
61+
62+
[project.urls]
63+
homepage = "https://github.com/jazzband/django-pipeline/"
64+
documentation = "https://django-pipeline.readthedocs.io/"
65+
repository = "https://github.com/jazzband/django-pipeline"
66+
changelog = "https://github.com/jazzband/django-pipeline/blob/master/HISTORY.rst"
67+
68+
[tool.setuptools]
69+
include-package-data = true
70+
71+
[tool.setuptools.packages.find]
72+
exclude = ["tests", "tests.tests"]
73+
74+
[tool.setuptools_scm]
75+
local_scheme = "dirty-tag"
76+
177
[tool.black]
278
line-length = 88
379
target-version = ["py39"]

requirements.txt

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

setup.cfg

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

setup.py

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

0 commit comments

Comments
 (0)