Skip to content

Commit

Permalink
Migrate from setup.cfg to pyproject.toml for project metadata
Browse files Browse the repository at this point in the history
This is the latest standard way to specify project metadata, as per PEP 621
Also move flake8 config back tox.ini
This means we can have one less file in the repo root.

setuptools + pyproject.toml automatically supports "src-layout" projects,
so will automatically find the source code in "src" directory.
  • Loading branch information
LincolnPuzey committed Jul 1, 2023
1 parent c6bcd7f commit 65b1a4a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 53 deletions.
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,51 @@
requires = ["setuptools ~= 68.0"]
build-backend = "setuptools.build_meta"

[project]
name = "django-dirtyfields"
dynamic = ["version"]
description = "Tracking dirty fields on a Django model instance."
keywords = ["django", "dirtyfields", "track", "model", "changes"]
readme = "README.rst"
license = {file = "LICENSE"}
authors = [{name = "Romain Garrigues"}]
maintainers = [{name = "Lincoln Puzey"}]
requires-python = ">=3.8"
dependencies = [
"Django>=2.2",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
]

[project.urls]
Homepage = "https://github.com/romgar/django-dirtyfields"
Changelog = "https://github.com/romgar/django-dirtyfields/blob/develop/ChangeLog.rst"
Documentation = "https://django-dirtyfields.readthedocs.io"

[tool.setuptools.dynamic]
version = {attr = "dirtyfields.__version__"}

[tool.pytest.ini_options]
django_find_project = false
DJANGO_SETTINGS_MODULE = 'tests.django_settings'
Expand Down
53 changes: 0 additions & 53 deletions setup.cfg

This file was deleted.

5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ commands =
python --version
pip list
flake8 -v src tests docs

[flake8]
ignore = E133,W503
max-line-length = 120
extend-exclude = docs/_build,docs/.venv-docs

0 comments on commit 65b1a4a

Please sign in to comment.