-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With [PEP 621 support added to setuptools](pypa/setuptools#2970) last year, and with pip supporting editable installs as of 21.3, we can move to `pyproject.toml` and deprecate `setup.py`. The file remains for legacy pip support. Because [flake8 does not want to support pyproject.tml yet](PyCQA/flake8#234), unlike all the other tools we use, I’m removing it in favor of [ruff](https://github.com/charliermarsh/ruff). This change also enables support for Wagtail 3.x by removing the `<3` version pin. This will result in the last release of TreeModelAdmin to support Wagtail < 4. Wagtail 4.x is not yet supported. The version is bumped to 1.5.0 for anticipated release to permit installing with Wagtail 3.x. I’ve also brought in some quality-of-life improvements for coverage checking from the Django-Flags tox/GHA setup.
- Loading branch information
1 parent
1d7bc3d
commit 2df1594
Showing
6 changed files
with
174 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,53 @@ | ||
[project] | ||
name = "wagtail-treemodeladmin" | ||
version = "1.5.0" | ||
description = "TreeModelAdmin for Wagtail" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = {text = "CC0"} | ||
authors = [ | ||
{name = "CFPB", email = "[email protected]" } | ||
] | ||
dependencies = [ | ||
"wagtail>=2.15,<4", | ||
] | ||
classifiers = [ | ||
"Framework :: Django", | ||
"Framework :: Django :: 3.2", | ||
"Framework :: Django :: 4", | ||
"Framework :: Wagtail", | ||
"Framework :: Wagtail :: 2", | ||
"Framework :: Wagtail :: 3", | ||
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", | ||
"License :: Public Domain", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
] | ||
|
||
[project.optional-dependencies] | ||
testing = [ | ||
"coverage[toml]", | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/cfpb/wagtail-treemodeladmin" | ||
"Bug Reports" = "https://github.com/cfpb/wagtail-treemodeladmin/issues" | ||
"Source" = "https://github.com/cfpb/wagtail-treemodeladmin" | ||
|
||
[build-system] | ||
requires = ["setuptools>=43.0.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.package-data] | ||
treemodeladmin = [ | ||
"templates/treemodeladmin/*", | ||
"templates/treemodeladmin/includes/*", | ||
"static/treemodeladmin/css/*", | ||
] | ||
|
||
[tool.black] | ||
line-length = 79 | ||
target-version = ['py36', 'py38'] | ||
target-version = ["py38"] | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
( | ||
|
@@ -14,8 +61,6 @@ exclude = ''' | |
| dist | ||
| migrations | ||
| site | ||
| \*.json | ||
| \*.csv | ||
)/ | ||
) | ||
''' | ||
|
@@ -37,5 +82,22 @@ sections = [ | |
"LOCALFOLDER" | ||
] | ||
|
||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
[tool.ruff] | ||
exclude = [ | ||
".git", | ||
".tox", | ||
"__pycache__", | ||
"*/migrations/*.py", | ||
"*/tests/treemodeladmintest/migrations/*", | ||
] | ||
ignore = [] | ||
select = [ | ||
"E", | ||
"F", | ||
"W", | ||
] | ||
|
||
[tool.coverage.run] | ||
omit = [ | ||
"treemodeladmin/tests/*", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,4 @@ | ||
from setuptools import find_packages, setup | ||
from setuptools import setup | ||
|
||
install_requires = [ | ||
"wagtail>=2.11,<3", | ||
] | ||
|
||
testing_extras = ["coverage>=3.7.0"] | ||
|
||
setup( | ||
name="wagtail-treemodeladmin", | ||
url="https://github.com/cfpb/wagtail-treemodeladmin", | ||
author="CFPB", | ||
author_email="[email protected]", | ||
description="TreeModelAdmin for Wagtail", | ||
long_description=open("README.md", "r", encoding="utf-8").read(), | ||
long_description_content_type="text/markdown", | ||
license="CC0", | ||
version="1.5.0", | ||
include_package_data=True, | ||
packages=find_packages(), | ||
package_data={ | ||
"treemodeladmin": [ | ||
"templates/treemodeladmin/*", | ||
"templates/treemodeladmin/includes/*", | ||
"static/treemodeladmin/css/*", | ||
] | ||
}, | ||
python_requires=">=3.6", | ||
install_requires=install_requires, | ||
extras_require={"testing": testing_extras}, | ||
classifiers=[ | ||
"Framework :: Django", | ||
"Framework :: Django :: 2.2", | ||
"Framework :: Django :: 3.1", | ||
"Framework :: Wagtail", | ||
"Framework :: Wagtail :: 2", | ||
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", | ||
"License :: Public Domain", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
], | ||
) | ||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters