105 lines
3.6 KiB
TOML
Executable File
105 lines
3.6 KiB
TOML
Executable File
# pyproject.toml -- PEP 517/518 build configuration for ISO Scalpel.
|
|
# Makes the project pip- and pipx-installable as a proper Python package.
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=61.0", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "iso-scalpel"
|
|
version = "1.1.0"
|
|
description = "A PySide6 disc-image editor built on pycdlib."
|
|
readme = "README.md"
|
|
license = { text = "GPL-2.0-or-later" }
|
|
authors = [
|
|
{ name = "Jeremy Anderson", email = "info@dcos.net" }
|
|
]
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"PySide6>=6.6",
|
|
"pycdlib>=1.13",
|
|
]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Environment :: X11 Applications :: Qt",
|
|
"Intended Audience :: End Users/Desktop",
|
|
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
|
|
"Operating System :: POSIX :: Linux",
|
|
"Operating System :: MacOS",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Topic :: System :: Archiving",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://dcos.net"
|
|
Repository = "https://dcos.net"
|
|
|
|
[project.scripts]
|
|
# After `pipx install iso-scalpel` the user gets a `iso-scalpel` command.
|
|
iso-scalpel = "iso_scalpel.app:run_argv"
|
|
|
|
[project.optional-dependencies]
|
|
test = ["pytest>=7"]
|
|
dev = ["pytest>=7", "ruff>=0.6"]
|
|
|
|
[tool.setuptools]
|
|
# Use package discovery for the iso_scalpel package.
|
|
packages = { find = { include = ["iso_scalpel*"] } }
|
|
include-package-data = true
|
|
|
|
[tool.setuptools.package-data]
|
|
iso_scalpel = ["../resources/**/*"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "-ra -q --tb=short"
|
|
|
|
# --------------------------------------------------------------------------
|
|
# Ruff configuration -- locks in the coding standards applied during the
|
|
# QA pass: PEP 8 style, PEP 585/604 annotations, SEI CERT error-handling
|
|
# rules (no blind except, no silent try-except-pass), MISRA-aligned
|
|
# immutability rules (no mutable defaults, no function calls in defaults),
|
|
# and POSIX-friendly shebang discipline.
|
|
# --------------------------------------------------------------------------
|
|
[tool.ruff]
|
|
line-length = 100
|
|
extend-exclude = [".venv", "build", "dist"]
|
|
|
|
[tool.ruff.lint]
|
|
# Default rule set plus the explicit security / modernity families.
|
|
# BLE001 is still enabled; legitimate top-level error boundaries opt out
|
|
# per-occurrence with `# noqa: BLE001 -- <reason>` so every silence is
|
|
# auditable in grep.
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes (unused imports, undefined names)
|
|
"I", # isort (import sorting)
|
|
"B", # flake8-bugbear (mutable defaults, etc.)
|
|
"C4", # flake8-comprehensions
|
|
"SIM", # flake8-simplify
|
|
"UP", # pyupgrade (PEP 585/604 annotations)
|
|
"S", # flake8-bandit (try-except-pass, subprocess, etc.)
|
|
"BLE", # flake8-blind-except
|
|
"RUF", # ruff-specific (unused noqa, sorted __all__, etc.)
|
|
"EXE", # flake8-executable (shebangs)
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Tests use ``assert`` (the correct tool, not unittest) and must call
|
|
# ``pytest.importorskip`` before importing PySide6/pycdlib so the module
|
|
# still loads when those packages are absent.
|
|
"tests/**/*.py" = ["S101", "E402"]
|
|
# Entry points must insert the project root on sys.path *before* importing
|
|
# the package, so module-import-not-at-top is intentional.
|
|
"main.py" = ["E402"]
|
|
"cli.py" = ["E402"]
|
|
# app.py hosts the Qt stylesheet (QSS), where one-selector-per-line is the
|
|
# readable form and wrapping hurts clarity.
|
|
"iso_scalpel/app.py" = ["E501"]
|
|
|