Switch to hatch build system

This commit is contained in:
Adrian Vollmer 2024-04-28 13:06:20 +02:00
parent adc35023a5
commit 37ebb12d6b
18 changed files with 30 additions and 67 deletions

54
.gitignore vendored
View File

@ -1,48 +1,16 @@
*.py[cod]
*.pyc
__pycache__/
# C extensions
*.so
.venv/
venv/
# Packages
*.egg*
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
# Installer logs
pip-log.txt
# Unit test / coverage reports
cover/
.coverage*
.tox
.venv
.pytest_cache/
.mypy_cache/
# Translations
*.mo
# Complexity
output/*.html
output/*/index.html
# Editors
*~
.*.swp
.*sw?
# Sphinx
_version.py
_build
# Other
build
dist
*.egg-info
.nox
.pytest_cache/
_download

View File

@ -1,4 +0,0 @@
graft zundler
global-exclude *.py[cod]
prune .*
exclude .*

View File

@ -10,5 +10,5 @@ def tests(session):
@nox.session()
def black(session):
session.install(".[tests]")
session.run("black", "zundler", "--check", *session.posargs)
session.run("black", "src", "--check", *session.posargs)
session.run("black", "tests", "--check", *session.posargs)

View File

@ -1,6 +1,6 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "zundler"
@ -32,19 +32,28 @@ dependencies = [
]
dynamic = ["version"]
[project.optional-dependencies]
tests = [
'pytest>=8',
'selenium',
'pytest-selenium',
'pytest-docker',
'black',
'nox',
]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "_version.py"
[project.entry-points]
"sphinx.builders" = {zundler = "zundler.sphinxext"}
[project.scripts]
zundler = "zundler.__main__:main"
[tool.setuptools]
zip-safe = false
include-package-data = true
[tool.setuptools.packages]
find = {namespaces = false}
[tool.mypy]
python_version = "3.8"
show_column_numbers = true
@ -55,16 +64,6 @@ incremental = true
check_untyped_defs = true
warn_unused_ignores = true
[project.optional-dependencies]
tests = [
'pytest>=8',
'selenium',
'pytest-selenium',
'pytest-docker',
'black',
'nox',
]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"