Skip to content

Commit 2f2c44b

Browse files
authored
Switch from setup.py to pyproject.toml. (#36)
1 parent 839374f commit 2f2c44b

File tree

6 files changed

+65
-68
lines changed

6 files changed

+65
-68
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ jobs:
5858
python-version: "3.10"
5959
- name: Install dependencies
6060
run: |
61-
pip install setuptools wheel twine
61+
pip install build twine
6262
- name: Publish
6363
env:
6464
TWINE_USERNAME: __token__
6565
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
6666
run: |
67-
python setup.py sdist bdist_wheel
67+
python -m build
6868
twine upload dist/*

crispy_bootstrap4/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "2025.5"

pyproject.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"setuptools>=61",
5+
]
6+
7+
[project]
8+
name="crispy-bootstrap4"
9+
description="Bootstrap4 template pack for django-crispy-forms"
10+
readme = "README.md"
11+
license = {text = "MIT"}
12+
authors = [{name = "David Smith"}]
13+
requires-python = ">=3.8"
14+
classifiers=[
15+
"Environment :: Web Environment",
16+
"Development Status :: 5 - Production/Stable",
17+
"Framework :: Django",
18+
"Framework :: Django :: 4.2",
19+
"Framework :: Django :: 5.0",
20+
"Framework :: Django :: 5.1",
21+
"Framework :: Django :: 5.2",
22+
"Operating System :: OS Independent",
23+
"License :: OSI Approved :: MIT License",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3.8",
26+
"Programming Language :: Python :: 3.9",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
31+
"Topic :: Internet :: WWW/HTTP",
32+
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
33+
"Topic :: Software Development :: Libraries :: Python Modules",
34+
]
35+
dynamic = [
36+
"version",
37+
]
38+
dependencies = [
39+
"django>=4.2",
40+
"django-crispy-forms>=2.3",
41+
]
42+
[project.optional-dependencies]
43+
test = [
44+
"pytest",
45+
"pytest-django",
46+
]
47+
[project.urls]
48+
"CI" = "https://github.com/django-crispy-forms/crispy-bootstrap4/actions"
49+
"Changelog" = "https://github.com/django-crispy-forms/crispy-bootstrap4/releases"
50+
"Homepage" = "https://github.com/django-crispy-forms/crispy-bootstrap4"
51+
"Issues" = "https://github.com/django-crispy-forms/crispy-bootstrap4/issues"
52+
53+
[tool.setuptools.dynamic]
54+
version = {attr = "crispy_bootstrap4.__version__"}
55+
56+
[tool.isort]
57+
profile = "black"
58+
59+
[tool.pytest.ini_options]
60+
DJANGO_SETTINGS_MODULE= "tests.test_settings"

setup.cfg

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

setup.py

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

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ max_line_length=118
44
[tox]
55
envlist =
66
{py38,py39,py310,py311}-django{42}-crispy{2,-latest},
7-
{py310,py311,py312}-django{50,51,-latest}-crispy{2,-latest},
8-
{py313}-django{51,-latest}-crispy{2,-latest},
7+
{py310,py311,py312}-django{50,51}-crispy{2,-latest},
8+
{py313}-django{51}-crispy{2,-latest},
99
lint
1010

1111
[testenv]

0 commit comments

Comments
 (0)