Skip to content

Commit

Permalink
PEP 621: Migrate from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Nov 8, 2024
1 parent 7f0f29d commit 38bda60
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 89 deletions.
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[build-system]
build-backend = "setuptools.build_meta"

requires = [
"setuptools>=61.2",
"setuptools-scm",
]

[project]
name = "django-configurations"
description = "A helper for organizing Django settings."
readme.content-type = "text/x-rst"
readme.file = "README.rst"
license = { text = "BSD" }
authors = [ { name = "Jannis Leidel", email = "[email protected]" } ]
requires-python = ">=3.9,<4.0"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Utilities",
]
dynamic = [ "version" ]

dependencies = [ "django>=3.2" ]
optional-dependencies.cache = [ "django-cache-url" ]
optional-dependencies.database = [ "dj-database-url" ]
optional-dependencies.email = [ "dj-email-url" ]
optional-dependencies.search = [ "dj-search-url" ]
optional-dependencies.testing = [
"dj-database-url",
"dj-email-url",
"dj-search-url",
"django-cache-url>=1",
]
urls.Homepage = "https://django-configurations.readthedocs.io/"
urls.Source = "https://github.com/jazzband/django-configurations"
scripts.django-cadmin = "configurations.management:execute_from_command_line"

[tool.setuptools]
packages = [ "configurations" ]
zip-safe = false
include-package-data = false
10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

71 changes: 0 additions & 71 deletions setup.py

This file was deleted.

23 changes: 15 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[tox]
skipsdist = true
skip_missing_interpreters = true
isolated_build = true
usedevelop = true
minversion = 1.8
envlist =
Expand All @@ -25,7 +27,7 @@ usedevelop = true
setenv =
DJANGO_SETTINGS_MODULE = tests.settings.main
DJANGO_CONFIGURATION = Test
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml
deps =
dj32: django~=3.2.9
dj41: django~=4.1.3
Expand All @@ -44,16 +46,17 @@ commands =
python --version
{envbindir}/coverage run {envbindir}/django-cadmin test -v2 {posargs:tests}
coverage combine . tests docs
coverage report -m --skip-covered
coverage report --show-missing --skip-covered
coverage xml

[testenv:py311-checkqa]
commands =
flake8 {toxinidir}
check-manifest -v
python setup.py sdist
check-manifest --verbose
python -m build
twine check dist/*
deps =
build
flake8
twine
check-manifest
Expand All @@ -64,9 +67,13 @@ deps =
-r docs/requirements.txt
commands =
sphinx-build \
-b html \
-a \
-W \
-n \
--builder html \
--write-all \
--fail-on-warning \
--nitpicky \
docs \
docs/_build/html

[flake8]
exclude = .tox,docs/*,.eggs
ignore = E124,E127,E128,E501,W503

0 comments on commit 38bda60

Please sign in to comment.