pyproject.toml: various fixes and modernizations

also switch from hatchling to setuptools
This commit is contained in:
2026-07-27 06:00:01 +09:00
parent d72147e383
commit ffd7d7c963
+21 -7
View File
@@ -2,7 +2,9 @@
name = "worblehat"
version = "0.1.0"
description = "Worblehat is a simple library management system written specifically for Programvareverkstedet"
authors = []
authors = [
{ name = "Programvareverkstedet", email = "projects@pvv.ntnu.no" }
]
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.12"
@@ -37,8 +39,18 @@ test = [
worblehat = "worblehat:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
"setuptools-scm",
]
[tool.setuptools.packages.find]
where = ["src"]
include = ["worblehat*"]
[tool.setuptools.package-dir]
"" = "src"
[tool.poe.tasks]
clean = """
@@ -53,7 +65,7 @@ migrate = "alembic upgrade head"
downmigrate = "alembic downgrade -1"
# Be careful with cleanmigrations. If you run migrate a database and then
# delete the migration file with this, there will be no easy way of downgrading
cleanmigrations = "git clean -f worblehat/models/migrations/versions"
cleanmigrations = "git clean -f src/worblehat/models/migrations/versions"
[tool.uv.sources]
libdib = { git = "https://git.pvv.ntnu.no/Projects/libdib.git" }
@@ -92,11 +104,13 @@ ignore = [
# "S311", # non-cryptographic random generator
]
[tool.ruff.lint.flake8-annotations]
suppress-dummy-args = true
ignore-fully-untyped = true
[tool.pytest.ini_options]
addopts = [
# "--cov=dibbler.lib",
# "--cov=dibbler.models",
# "--cov=dibbler.queries",
"--cov=worblehat.queries",
"--cov-report=html",
"--cov-branch",