mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-07-18 00:31:08 +00:00
build: subpackages implementation (#164)
* migrate to hatch * reorder tests * generic fixtures * straight forward conftest * fix docs generation * fix tox environments * reformat tomls * cleanup pyproject * some play with renaming * move root conftest into pytest plugins * fix setup script * move fixtures to __init__.py * remove duplicate fixtures * disable pylint warning * simplify configuration fixture * remove empty conftest * remove crap from local pyprojects
This commit is contained in:
+67
-99
@@ -1,91 +1,31 @@
|
||||
[build-system]
|
||||
requires = ["flit_core"]
|
||||
build-backend = "flit_core.buildapi"
|
||||
requires = [
|
||||
"hatchling",
|
||||
]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "ahriman"
|
||||
|
||||
authors = [
|
||||
{ name = "ahriman team" },
|
||||
]
|
||||
dependencies = [
|
||||
"ahriman-core",
|
||||
"ahriman-triggers",
|
||||
"ahriman-web",
|
||||
]
|
||||
description = "ArcH linux ReposItory MANager"
|
||||
dynamic = [
|
||||
"version",
|
||||
]
|
||||
license = { file = "COPYING" }
|
||||
readme = "README.md"
|
||||
|
||||
requires-python = ">=3.13"
|
||||
|
||||
license = {file = "COPYING"}
|
||||
authors = [
|
||||
{name = "ahriman team"},
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
"bcrypt",
|
||||
"filelock",
|
||||
"inflection",
|
||||
"pyelftools",
|
||||
"requests",
|
||||
]
|
||||
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
journald = [
|
||||
"systemd-python",
|
||||
]
|
||||
# FIXME technically this dependency is required, but in some cases we do not have access to
|
||||
# the libalpm which is required in order to install the package. Thus in case if we do not
|
||||
# really need to run the application we can move it to "optional" dependencies
|
||||
pacman = [
|
||||
"pyalpm",
|
||||
]
|
||||
reports = [
|
||||
"Jinja2",
|
||||
]
|
||||
s3 = [
|
||||
"boto3",
|
||||
]
|
||||
shell = [
|
||||
"IPython"
|
||||
]
|
||||
stats = [
|
||||
"matplotlib",
|
||||
]
|
||||
unixsocket = [
|
||||
"requests-unixsocket2", # required by unix socket support
|
||||
]
|
||||
validator = [
|
||||
"cerberus",
|
||||
]
|
||||
web = [
|
||||
"aiohttp",
|
||||
"aiohttp_cors",
|
||||
"aiohttp_jinja2",
|
||||
"aiohttp_sse",
|
||||
]
|
||||
web-auth = [
|
||||
"ahriman[web]",
|
||||
"aiohttp_session",
|
||||
"aiohttp_security",
|
||||
"cryptography",
|
||||
]
|
||||
web-docs = [
|
||||
"ahriman[web]",
|
||||
"aiohttp-apispec",
|
||||
"setuptools", # required by aiohttp-apispec
|
||||
]
|
||||
web-metrics = [
|
||||
"ahriman[web]",
|
||||
"aiohttp-openmetrics",
|
||||
]
|
||||
web-oauth2 = [
|
||||
"ahriman[web-auth]",
|
||||
"aioauth-client",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
ahriman = "ahriman.application.ahriman:run"
|
||||
|
||||
[project.urls]
|
||||
Changelog = "https://github.com/arcan1s/ahriman/releases"
|
||||
Documentation = "https://ahriman.readthedocs.io/"
|
||||
Repository = "https://github.com/arcan1s/ahriman"
|
||||
Changelog = "https://github.com/arcan1s/ahriman/releases"
|
||||
|
||||
[dependency-groups]
|
||||
check = [
|
||||
@@ -95,38 +35,66 @@ check = [
|
||||
"pylint",
|
||||
]
|
||||
docs = [
|
||||
"Sphinx",
|
||||
"argparse-manpage",
|
||||
"pydeps",
|
||||
"shtab",
|
||||
"sphinx-argparse",
|
||||
"sphinx-rtd-theme>=1.1.1", # https://stackoverflow.com/a/74355734
|
||||
"ahriman-core[s3,validator]",
|
||||
"Sphinx",
|
||||
"argparse-manpage",
|
||||
"pydeps",
|
||||
"shtab",
|
||||
"sphinx-argparse",
|
||||
"sphinx-rtd-theme>=1.1.1", # https://stackoverflow.com/a/74355734
|
||||
]
|
||||
tests = [
|
||||
"coverage",
|
||||
"pytest",
|
||||
"pytest-aiohttp",
|
||||
"pytest-cov",
|
||||
"pytest-helpers-namespace",
|
||||
"pytest-mock",
|
||||
"pytest-resource-path",
|
||||
"pytest-spec",
|
||||
]
|
||||
|
||||
[tool.flit.sdist]
|
||||
include = [
|
||||
"AUTHORS",
|
||||
"CONTRIBUTING.md",
|
||||
"SECURITY.md",
|
||||
"package",
|
||||
"frontend",
|
||||
"subpackages.py",
|
||||
"web.png",
|
||||
]
|
||||
[tool.hatch.build.targets.sdist]
|
||||
exclude = [
|
||||
"package/archlinux",
|
||||
"frontend/node_modules",
|
||||
"frontend/package-lock.json",
|
||||
"/.github",
|
||||
"/archlinux",
|
||||
"/docker",
|
||||
"/docs",
|
||||
"/recipes",
|
||||
"/tools",
|
||||
"tests",
|
||||
"/.bandit.toml",
|
||||
"/.dockerignore",
|
||||
"/.pylint.toml",
|
||||
"/.pytest.toml",
|
||||
"/.readthedocs.yml",
|
||||
"/conftest.py",
|
||||
"/github-logo.png",
|
||||
"/tox.toml",
|
||||
"/toxfile.py",
|
||||
"/web.png",
|
||||
]
|
||||
|
||||
[tool.flit.external-data]
|
||||
directory = "package"
|
||||
[tool.hatch.build.targets.wheel]
|
||||
bypass-selection = true
|
||||
|
||||
[tool.hatch.envs.default]
|
||||
workspace.members = [
|
||||
{ path = "ahriman-core" },
|
||||
{ path = "ahriman-triggers" },
|
||||
{ path = "ahriman-web" },
|
||||
]
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "ahriman-core/src/ahriman/__init__.py"
|
||||
|
||||
[tool.uv.sources]
|
||||
ahriman-core = { workspace = true }
|
||||
ahriman-triggers = { workspace = true }
|
||||
ahriman-web = { workspace = true }
|
||||
|
||||
[tool.uv.workspace]
|
||||
members = [
|
||||
"ahriman-core",
|
||||
"ahriman-triggers",
|
||||
"ahriman-web",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user