-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathpyproject.toml
More file actions
189 lines (169 loc) · 5.31 KB
/
pyproject.toml
File metadata and controls
189 lines (169 loc) · 5.31 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
[build-system]
requires = ["setuptools", "wheel", "setuptools_scm>=8", "pkgconfig>=1.5.1", "lxml>=3.8"]
[project]
name = "xmlsec"
dynamic = ["version"]
description = "Python bindings for the XML Security Library"
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.9"
dependencies = ["lxml>=3.8"]
keywords = ["xmlsec"]
authors = [
{name = "Bulat Gaifullin", email = "support@mehcode.com"}
]
maintainers = [
{name = "Oleg Hoefling", email = "oleg.hoefling@gmail.com"},
{name = "Amin Solhizadeh", email = "amin.solhizadeh@gmail.com"}
]
license = "MIT"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: C",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Text Processing :: Markup :: XML",
"Typing :: Typed"
]
[project.urls]
Documentation = "https://xmlsec.readthedocs.io"
Source = "https://github.com/xmlsec/python-xmlsec"
Changelog = "https://github.com/xmlsec/python-xmlsec/releases"
# setuptools
[tool.setuptools]
zip-safe = false
packages = ["xmlsec"]
package-dir = {"" = "src"}
[tool.setuptools.package-data]
xmlsec = ["py.typed", "*.pyi"]
[tool.setuptools_scm]
# mypy
[tool.mypy]
files = ['src']
ignore_missing_imports = false
warn_unused_configs = true
disallow_subclassing_any = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
disallow_any_unimported = true
strict_optional = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_no_return = true
no_implicit_reexport = true
show_error_codes = true
# TODO: Remove this override after adding full type annotations in build tooling modules.
[[tool.mypy.overrides]]
module = [
"build_support.network",
"build_support.releases",
"build_support.lib_xmlsec_dependency_builder",
"build_libs_xmlsec"
]
disallow_untyped_calls = false
disallow_untyped_defs = false
disable_error_code = ["attr-defined"]
# ruff
[tool.ruff]
# Maximum line length, same as your original Black + Flake8 config
line-length = 130
# Target Python version (used for autofixes and style rules)
target-version = "py39"
# Directories and files to exclude from linting and formatting
exclude = [
".venv*", # virtual environments
".git", # git directory
"build", # build output
"dist", # distribution packages
"libs", # vendor libraries
".eggs", # setuptools egg folders
".direnv*", # direnv environments
"*_pb2.pyi" # protobuf-generated type stubs
]
[tool.ruff.lint]
# Enable rule categories:
# E = pycodestyle (style issues, like indentation, whitespace, etc.)
# F = pyflakes (unused imports, undefined names)
# I = isort (import sorting)
# B = flake8-bugbear (common bugs & anti-patterns)
# UP = pyupgrade (auto-upgrade syntax for newer Python)
# SIM = flake8-simplify (simplifiable code patterns)
# RUF = Ruff-native rules (extra, performance-optimized checks)
select = ["E", "F", "I", "B", "UP", "SIM", "RUF"]
# TODO: Add more rule categories as needed, e.g.:
# D = pydocstyle (docstring format/style issues)
[tool.ruff.lint.per-file-ignores]
"*.pyi" = [
# Ignore formatting and import errors in stub files
"E301", # expected 1 blank line, found 0
"E302", # expected 2 blank lines, found 1
"E305", # expected 2 blank lines after class or function
"E501", # line too long
"E701", # multiple statements on one line
"F401", # unused import
"F811", # redefinition of unused name
"F822" # undefined name in `__all__`
]
"doc/source/conf.py" = [
"D1" # missing docstring in public module/class/function
]
"doc/source/examples/*.py" = [
"D1", # allow missing docstrings in examples
"E501" # allow long lines in code examples
]
"tests/*.py" = [
"D1" # allow missing docstrings in test files
]
[tool.ruff.format]
# Always use single quotes (e.g., 'text' instead of "text")
quote-style = "single"
# Format code with or without trailing commas
# true = prefer trailing commas where valid
skip-magic-trailing-comma = false
# Enforce Unix-style line endings (LF)
line-ending = "lf"
# cibuildwheel
[tool.cibuildwheel]
build = [
"cp39-*",
"cp310-*",
"cp311-*",
"cp312-*",
"cp313-*",
"cp314-*"
]
build-verbosity = 1
environment = {PYXMLSEC_STATIC_DEPS="true"}
build-frontend = "build"
skip = [
"pp*", # Skips PyPy builds (pp38-*, pp39-*, etc.)
"*musllinux_riscv64" # maturin and ruff currently don’t support the musl + riscv64 target
]
test-command = "pytest -v --color=yes {package}/tests"
before-test = "pip install -r requirements-test.txt"
[tool.cibuildwheel.linux]
archs = ["x86_64", "aarch64", "riscv64"]
environment-pass = [
"PYXMLSEC_STATIC_DEPS",
"GH_TOKEN"
]
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
[tool.cibuildwheel.windows]
archs = ["AMD64"]
[[tool.cibuildwheel.overrides]]
select = "*-manylinux*"
before-all = "yum install -y perl-core"