fix: reduce distribution size

This commit is contained in:
sebthom
2025-05-15 11:43:38 +02:00
committed by Sebastian Thomschke
parent 6ede14596d
commit f1cd597dd8
2 changed files with 14 additions and 5 deletions

View File

@@ -22,9 +22,13 @@ excluded_modules = [
"bz2", "bz2",
"ftplib", "ftplib",
"lzma", "lzma",
"mypy", # wrongly included dev-dep
"rich", # wrongly included dev-dep (transitive dep of pip-audit)
"setuptools", "setuptools",
"smtplib", "smtplib",
"statistics", "statistics",
"toml", # wrongly included dev-dep (transitive dep of pip-audit)
"tomllib",
"tracemalloc", "tracemalloc",
"xml.sax", "xml.sax",
"xmlrpc" "xmlrpc"

View File

@@ -92,8 +92,13 @@ generate-schemas = "python scripts/generate_schemas.py"
compile.cmd = "python -O -m PyInstaller pyinstaller.spec --clean" compile.cmd = "python -O -m PyInstaller pyinstaller.spec --clean"
compile.env = {PYTHONHASHSEED = "1", SOURCE_DATE_EPOCH = "0"} # https://pyinstaller.org/en/stable/advanced-topics.html#creating-a-reproducible-build compile.env = {PYTHONHASHSEED = "1", SOURCE_DATE_EPOCH = "0"} # https://pyinstaller.org/en/stable/advanced-topics.html#creating-a-reproducible-build
deps = "pdm list --fields name,version,groups"
"deps:tree" = "pdm list --tree"
"deps:runtime" = "pdm list --fields name,version,groups --include default"
"deps:runtime:tree" = "pdm list --tree --include default"
# format & lint # format & lint
format = { composite = ["format:py", "format:yaml"] } format = { composite = ["format:py", "format:yaml"] }
"format:py" = { shell = "autopep8 --recursive --in-place scripts src tests --verbose && python scripts/post_autopep8.py scripts src tests" } "format:py" = { shell = "autopep8 --recursive --in-place scripts src tests --verbose && python scripts/post_autopep8.py scripts src tests" }
"format:yaml" = "yamlfix scripts/ src/ tests/" "format:yaml" = "yamlfix scripts/ src/ tests/"
@@ -104,10 +109,10 @@ lint = { composite = ["lint:ruff", "lint:mypy", "lint:pyright"] }
"lint:fix" = {shell = "ruff check --preview --fix" } "lint:fix" = {shell = "ruff check --preview --fix" }
# tests # tests
test = "python -m pytest --capture=tee-sys" test = "python -m pytest --capture=tee-sys"
utest = "python -m pytest --capture=tee-sys -m 'not itest'" utest = "python -m pytest --capture=tee-sys -m 'not itest'"
itest = "python -m pytest --capture=tee-sys -m 'itest'" itest = "python -m pytest --capture=tee-sys -m 'itest'"
"test:cov" = { composite = ["test --cov=src/kleinanzeigen_bot"] } "test:cov" = { composite = ["test --cov=src/kleinanzeigen_bot"] }
"utest:cov" = { composite = ["utest --cov=src/kleinanzeigen_bot"] } "utest:cov" = { composite = ["utest --cov=src/kleinanzeigen_bot"] }
"itest:cov" = { composite = ["itest --cov=src/kleinanzeigen_bot"] } "itest:cov" = { composite = ["itest --cov=src/kleinanzeigen_bot"] }