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 authored and claudep committed Nov 26, 2023
1 parent a4db7c5 commit 1652dec
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 69 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 119
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools twine wheel
python -m pip install --upgrade build setuptools twine wheel
- name: Build package
run: |
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
python -m build --version
python -m build
twine check dist/*
- name: Upload packages to Jazzband
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To install django-formtools use your favorite packaging tool, e.g.pip::

Or download the source distribution from PyPI_ at
https://pypi.python.org/pypi/django-formtools, decompress the file and
run ``python setup.py install`` in the unpacked directory.
run ``pip install --editable .`` in the unpacked directory.

Then add ``'formtools'`` to your :setting:`INSTALLED_APPS` setting::

Expand Down
66 changes: 66 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=61.2",
"setuptools_scm",
]

[project]
name = "django-formtools"
description = "A set of high-level abstractions for Django forms"
license = {text = "BSD"}
authors = [{name = "Django Software Foundation", email = "foundation@djangoproject.com"}]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP",
]
dynamic = [
"version",
]
dependencies = [
"Django>=3.2",
]

[project.readme]
file = "README.rst"
content-type = "text/x-rst"

[project.urls]
Homepage = "https://django-formtools.readthedocs.io/en/latest/"
Source = "https://github.com/jazzband/django-formtools"

[tool.setuptools]
include-package-data = true
license-files = ["LICENSE"]
zip-safe = false

[tool.setuptools.packages.find]
exclude = ["tests"] # tests.*
namespaces = false

[tool.isort]
combine_as_imports = true
default_section = "THIRDPARTY"
include_trailing_comma = true
known_first_party = ["formtools"]
line_length = 79
multi_line_output = 5

13 changes: 0 additions & 13 deletions setup.cfg

This file was deleted.

52 changes: 0 additions & 52 deletions setup.py

This file was deleted.

0 comments on commit 1652dec

Please sign in to comment.