-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize setuptools support to use pyproject.toml (#184)
* Modernize setuptools support to use pyproject.toml Replace the obsolete `setup.py` script and `setup.cfg` configuration file with the modern PEP 621 `pyproject.toml` metadata. This also implies replacing the custom version/long-description grabbing logic (that is broken with Python 3.12) with the features nowadays built-in in setuptools. Fixes #172 Co-authored-by: Tom Flanagan <[email protected]>
- Loading branch information
Showing
10 changed files
with
82 additions
and
75 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 was deleted.
Oops, something went wrong.
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,5 +1,7 @@ | ||
include README.md | ||
include LICENSE.txt | ||
include pyproject.toml | ||
include setup/setup.py | ||
recursive-include tests * | ||
global-exclude __pycache__ | ||
global-exclude *.pyc |
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,10 +1,17 @@ | ||
test: | ||
python2 -m pytest . | ||
-python2 -m pytest . | ||
python3 -m pytest . | ||
|
||
publish: test | ||
rm dist/ -r | ||
python3 setup.py sdist | ||
python3 setup.py bdist_wheel | ||
publish_old: clean test | ||
python3 setup/setup.py sdist | ||
python3 setup/setup.py bdist_wheel | ||
python3 -m twine upload dist/* | ||
|
||
publish: clean test | ||
python3 -m build --no-isolation | ||
python3 -m twine upload dist/* | ||
|
||
clean: | ||
-rm dist/ -r | ||
-rm build/ -r | ||
-rm *.egg-info/ -r |
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 +1 @@ | ||
__version__ = '2.8.0' | ||
__version__ = '2.9.0' |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[build-system] | ||
requires = ["setuptools>=62"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "dominate" | ||
description = "Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API." | ||
readme = {file = "README.md", content-type = "text/markdown"} | ||
authors = [ | ||
{name = "Tom Flanagan", email = "[email protected]"}, | ||
{name = "Jake Wharton"}, | ||
] | ||
requires-python = ">=3.4" | ||
keywords = ["framework", "templating", "template", "html", "xhtml", "python", "html5"] | ||
license = {text = "LGPL-3.0-or-newer"} | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"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", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Text Processing :: Markup :: HTML", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/Knio/dominate" | ||
Source = "https://github.com/Knio/dominate" | ||
|
||
[tool.setuptools] | ||
packages = ["dominate"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "dominate._version.__version__"} |
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,5 @@ | ||
[metadata] | ||
license_file = LICENSE.txt | ||
license_files = ["LICENSE.txt"] | ||
|
||
[bdist_wheel] | ||
universal=1 | ||
|
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,18 +1,6 @@ | ||
import pytest | ||
|
||
import dominate | ||
from dominate import tags | ||
from dominate import util | ||
|
||
def test_version(): | ||
import dominate | ||
version = '2.8.0' | ||
version = '2.9.0' | ||
assert dominate.version == version | ||
assert dominate.__version__ == version | ||
|
||
|
||
def test_context(): | ||
id1 = dominate.dom_tag._get_thread_context() | ||
id2 = dominate.dom_tag._get_thread_context() | ||
assert id1 == id2 | ||
|
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