V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
140
py/pyproject.toml
Normal file
140
py/pyproject.toml
Normal file
@@ -0,0 +1,140 @@
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: 2025-06-17; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.installer.git
|
||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-FileType: SOURCE
|
||||
# SPDX-License-Identifier: EUPL-1.2 OR LicenseRef-CCLA-1.0
|
||||
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
|
||||
# SPDX-PackageName: CISS.debian.installer
|
||||
# SPDX-Security-Contact: security@coresecret.eu
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=69"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "ciss-debian-configurator"
|
||||
version = "8.0.0.post20250617" # PEP 440
|
||||
description = "CDC: ncurses-like configurator for CISS.debian.installer (menuconfig style)"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
license = { text = "EUPL-1.2 OR LicenseRef-CCLA-1.0" }
|
||||
authors = [
|
||||
{ name = "WEIDNER, Marc S.", email = "msw@coresecret.dev" }
|
||||
]
|
||||
keywords = ["debian", "installer", "curses", "ncurses", "yaml", "validator", "menuconfig", "tui"]
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Environment :: Console",
|
||||
"Intended Audience :: System Administrators",
|
||||
"License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)",
|
||||
"Topic :: System :: Installation/Setup",
|
||||
"Topic :: Text Processing :: Markup :: YAML",
|
||||
]
|
||||
|
||||
# Core dependencies:
|
||||
# - ruamel.yaml: YAML round trip (preserve comments, preserve order)
|
||||
# - pydantic: validation (IPv*Address, Port, AnyUrl, etc.)
|
||||
# - jsonschema: formal schemas for your YAMLs (machine checking)
|
||||
# - urwid: robust TUI widgets (ncurses-like, mature, terminal-compatible)
|
||||
# - prompt_toolkit & rich & typer: convenient input, rendering, CLI glue
|
||||
# - platformdirs: XDG/Windows-compliant config/cache paths
|
||||
dependencies = [
|
||||
# YAML
|
||||
"ruamel.yaml>=0.18.6",
|
||||
|
||||
# Validation
|
||||
"pydantic>=2.7.0",
|
||||
"jsonschema>=4.21.0",
|
||||
|
||||
# TUI / CLI
|
||||
"urwid>=2.6.0",
|
||||
"prompt_toolkit>=3.0.47",
|
||||
"rich>=13.7.0",
|
||||
"typer>=0.12.0",
|
||||
|
||||
# Other
|
||||
"platformdirs>=4.0.0"
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
cdc = "cdc.main:main"
|
||||
|
||||
[tool.setuptools]
|
||||
package-dir = {"" = "py"}
|
||||
packages = ["cdc"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 79
|
||||
target-version = "py313"
|
||||
src = ["py"]
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "double"
|
||||
indent-style = "space"
|
||||
indent-width = 4
|
||||
skip-magic-trailing-comma = false
|
||||
line-ending = "lf"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # pyflakes
|
||||
"N", # naming
|
||||
"C4", # comprehensions
|
||||
"SIM", # simplifications
|
||||
"DTZ", # tz-aware datetime
|
||||
"S", # security
|
||||
"A", # shadowed builtins
|
||||
"ARG", # unused arguments
|
||||
"BLE", # broad exceptions
|
||||
"FBT", # boolean trap
|
||||
"PTH", # pathlib preferred
|
||||
"RUF", # ruff-specific improvements
|
||||
]
|
||||
# Compatibility with formatters
|
||||
ignore = ["E203"]
|
||||
unsafe-fixes = false
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
known-first-party = ["cdc"]
|
||||
force-sort-within-sections = true
|
||||
combine-as-imports = true
|
||||
|
||||
[tool.ruff.lint.mccabe]
|
||||
max-complexity = 10
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
# Reexports are common in __init__.py
|
||||
"py/**/__init__.py" = ["F401"]
|
||||
# CLI entry is allowed to print (TUI/CLI)
|
||||
"py/cdc/main.py" = ["T201"]
|
||||
# Test files: less strict with import residues, etc.
|
||||
"tests/**" = ["S101","ARG001","ARG002","FBT001","FBT002"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = ["ruff>=0.4.0","mypy>=1.9.0","pytest>=8.0.0","pytest-cov>=5.0.0"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.13"
|
||||
mypy_path = ["py"]
|
||||
warn_unused_ignores = true
|
||||
warn_redundant_casts = true
|
||||
warn_unreachable = true
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
strict_optional = true
|
||||
no_implicit_optional = true
|
||||
no_implicit_reexport = true
|
||||
disallow_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
disallow_untyped_calls = true
|
||||
disallow_any_generics = true
|
||||
disallow_subclassing_any = true
|
||||
strict_equality = true
|
||||
plugins = ["pydantic.mypy"]
|
||||
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=toml
|
||||
Reference in New Issue
Block a user