-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
140 lines (127 loc) · 3.79 KB
/
pyproject.toml
File metadata and controls
140 lines (127 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
[project]
name = "msvcpp-normalize-pe"
dynamic = ["version"]
description = "Normalize PE files for reproducible MSVC++ builds"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "Apache-2.0"}
authors = [
{name = "Tim Ansell", email = "me@mith.ro"}
]
keywords = ["msvc", "reproducible-builds", "pe", "windows", "compiler", "deterministic"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Compilers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = []
[project.scripts]
msvcpp-normalize-pe = "msvcpp_normalize_pe.cli:main"
[project.urls]
Homepage = "https://github.com/mithro/msvcpp-normalize-pe"
Documentation = "https://msvcpp-normalize-pe.readthedocs.io"
Repository = "https://github.com/mithro/msvcpp-normalize-pe"
Issues = "https://github.com/mithro/msvcpp-normalize-pe/issues"
Changelog = "https://github.com/mithro/msvcpp-normalize-pe/releases"
[build-system]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
# Use git-describe for version numbering
# Formats versions like: 0.0.post37+g3a3ceb5 (37 commits after v0.0 tag)
version_scheme = "post-release"
local_scheme = "no-local-version"
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-cov>=4.1",
"hypothesis>=6.92",
"ruff>=0.1.0",
"mypy>=1.8",
]
[tool.ruff]
line-length = 100
target-version = "py39"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"RET", # flake8-return
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"FBT", # flake8-boolean-trap
"EM", # flake8-errmsg
"TRY", # tryceratops
"FA", # flake8-future-annotations
"COM", # flake8-commas
"D", # pydocstyle
"RUF", # ruff-specific rules
"PLR", # pylint refactoring
]
ignore = [
"TRY003", # Long exception messages are fine in this codebase
"EM101", # Exception message string literals are acceptable
"EM102", # Exception message f-strings are acceptable
"D203", # Incompatible with D211
"D213", # Incompatible with D212
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101", # Assert statements are required in tests
]
"src/msvcpp_normalize_pe/cli.py" = [
"T201", # print() is appropriate for CLI tool
]
"src/msvcpp_normalize_pe/patcher.py" = [
"T201", # print() used for verbose output
"PLR0911", # Multiple returns in validation function is clear
"BLE001", # Generic exceptions needed for robustness
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = [
"--cov=msvcpp_normalize_pe",
"--cov-report=term-missing",
"--cov-report=xml",
"--strict-markers",
"-v",
]
[tool.mypy]
python_version = "3.9"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_any_generics = true
# Ignore external packages that may use newer Python syntax
exclude = [
"^\\.venv/",
]
[tool.coverage.run]
branch = true
source = ["src"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]