-
-
Notifications
You must be signed in to change notification settings - Fork 218
/
pyproject.toml
351 lines (320 loc) · 10.6 KB
/
pyproject.toml
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
[build-system]
requires = [
"setuptools>=70.1,<76",
"cx_Logging>=3.1 ;sys_platform == 'win32'",
]
build-backend = "setuptools.build_meta"
[project]
name = "cx_Freeze"
description = "Create standalone executables from Python scripts"
authors = [
{name = "Anthony Tuininga", email = "anthony.tuininga@gmail.com"}
]
maintainers = [
{name = "Marcelo Duarte", email = "marcelotduarte@users.noreply.github.com"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Python Software Foundation License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Software Distribution",
"Topic :: Utilities",
]
keywords = ["cx-freeze cxfreeze cx_Freeze freeze python"]
requires-python = ">=3.9"
dependencies = [
"filelock>=3.12.3",
"importlib_metadata>=6 ;python_full_version < '3.10.2'",
"packaging>=24",
"setuptools>=65.6.3,<76",
"tomli>=2.0.1 ;python_version < '3.11'",
"typing_extensions>=4.10.0 ;python_version < '3.10'",
# Linux
"patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'x86_64'",
"patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'i686'",
"patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'aarch64'",
"patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'armv7l'",
"patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 'ppc64le'",
"patchelf>=0.14 ;sys_platform == 'linux' and platform_machine == 's390x'",
# macOS
"dmgbuild>=1.6.1 ;sys_platform == 'darwin'",
# Windows
"cabarchive>=0.2.4 ;sys_platform == 'win32'",
"cx_Logging>=3.1 ;sys_platform == 'win32'",
"lief>=0.12.0,<0.16.0 ;sys_platform == 'win32'",
"striprtf>=0.0.26 ;sys_platform == 'win32'",
]
dynamic = ["version"]
[project.optional-dependencies]
dev = [
"bump-my-version==0.28.1",
"cibuildwheel==2.21.3",
"pre-commit==4.0.1", # python_version >= 3.9
]
doc = [
"sphinx==7.4.7", # python_version 3.9-3.13
"sphinx-new-tab-link==0.6.1",
"sphinx-tabs==3.4.7",
"furo==2024.8.6",
"myst-parser>=3.0.1,<=4.0.0", # python_version 3.9,3.10-3.12
]
test = [
"pytest==8.3.3",
"pluggy==1.5.0",
"pytest-cov==6.0.0",
"coverage==7.6.4",
"pytest-datafiles==3.0.0",
"pytest-mock==3.14.0",
"pytest-timeout==2.3.1",
"pytest-xdist[psutil]==3.6.1",
]
[project.license]
file = "LICENSE.md"
content-type = "text/markdown"
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.entry-points."distutils.setup_keywords"]
executables = "cx_Freeze.executable:validate_executables"
[project.entry-points."setuptools.finalize_distribution_options"]
cxfreeze-plugin = "cx_Freeze:plugin_install"
[project.scripts]
cxfreeze = "cx_Freeze.cli:main"
cxfreeze-quickstart = "cx_Freeze.setupwriter:main"
[project.urls]
Home = "https://marcelotduarte.github.io/cx_Freeze"
Changelog = "https://cx-freeze.readthedocs.io/en/stable/releasenotes.html"
Documentation = "https://cx-freeze.readthedocs.io"
Source = "https://github.com/marcelotduarte/cx_Freeze"
Tracker = "https://github.com/marcelotduarte/cx_Freeze/issues"
Workflows = "https://github.com/marcelotduarte/cx_Freeze/actions?query=branch:main"
[tool.setuptools]
include-package-data = true
zip-safe = false
[tool.setuptools.dynamic]
version = {attr = "cx_Freeze.__version__"}
[tool.setuptools.packages]
find = {namespaces = false}
[tool.black]
line-length = 79
target-version = ["py39"]
[tool.bumpversion]
commit = true
current_version = "7.3.0-dev0"
message = "Bump version: {current_version} → {new_version} [ci skip]"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(\\-(?P<release>[a-z]+)(?P<build>\\d+))?"
serialize = [
"{major}.{minor}.{patch}-{release}{build}",
"{major}.{minor}.{patch}"
]
sign_tags = true
tag = true
tag_name = "{new_version}"
verbose = true
[[tool.bumpversion.files]]
filename = "cx_Freeze/__init__.py"
[[tool.bumpversion.files]]
filename = "doc/src/conf.py"
[tool.bumpversion.parts.release]
optional_value = "prod"
first_value = "dev"
values = [
"dev",
"prod"
]
[tool.cibuildwheel]
before-build = "uv pip install -r requirements.txt"
build = "cp3*"
build-frontend = "build[uv]"
build-verbosity = 1
skip = [
"cp3{8,9}-{many,musl}linux_{aarch64,ppc64le}",
"cp3{8,9,10}-macosx_{universal2,arm64}",
]
[tool.cibuildwheel.linux]
archs = "x86_64 aarch64 ppc64le"
before-build = """
cd /opt/_internal && tar -xvf static-libs-for-embedding-only.tar.xz
"""
repair-wheel-command = "auditwheel repair -L /bases/lib -w {dest_dir} {wheel}"
[tool.cibuildwheel.macos]
archs = "x86_64 universal2 arm64"
repair-wheel-command = """
delocate-listdeps {wheel} &&
delocate-wheel --require-archs {delocate_archs} -L bases/lib -w {dest_dir} {wheel}
"""
[tool.coverage.html]
directory = "build/coverage"
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
# TYPE_CHECKING block is never executed during pytest run
"if TYPE_CHECKING:",
]
ignore_errors = true
omit = [
"*/cx_Freeze/hooks/*",
"*/cx_Freeze/initscripts/*",
"*/cx_Freeze/_typing.py",
]
[tool.coverage.run]
relative_files = true
[tool.pylint.format]
max-line-length = 79
[tool.pylint.main]
disable = [
"attribute-defined-outside-init",
"c-extension-no-member",
"broad-exception-caught", # checked by ruff BLE001
"duplicate-code",
"exec-used",
"fixme", # also ignored in ruff
"global-statement", # checked by ruff PLW0603
"import-error",
"missing-class-docstring", # checked by ruff D101
"missing-function-docstring", # checked by ruff D103
"missing-module-docstring", # checked by ruff D100
"no-member", # not handled by ruff yet E1101
"protected-access", # checked by ruff SLF001
"redefined-builtin", # checked by ruff A
"too-few-public-methods",
"too-many-arguments", # also ignored in ruff
"too-many-branches", # also ignored in ruff
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-nested-blocks",
"too-many-return-statements", # checked by ruff PLR0911
"too-many-statements", # also ignored in ruff
"unbalanced-tuple-unpacking", # not handled by ruff yet W0632
"ungrouped-imports", # checked by ruff C0412 (I001)
"unused-argument", # checked by ruff ARG
"useless-parent-delegation", # not handled by ruff yet W0246
]
ignore-paths = [
"cx_Freeze/__init__.py",
"cx_Freeze/darwintools.py",
"cx_Freeze/hooks/__init__.py",
"cx_Freeze/hooks/pyqt5/resource.py",
"cx_Freeze/hooks/pyside2/resource.py",
"cx_Freeze/hooks/pyside6/resource.py",
"^samples/.*.py$",
"^tests/.*.py$",
]
jobs = 0
output-format = "colorized"
py-version = [3, 9]
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-rpfEsXx"
testpaths = ["tests"]
filterwarnings = [
"ignore::DeprecationWarning:distutils.*",
"ignore::DeprecationWarning:pkg_resources.*",
"ignore::DeprecationWarning:setuptools.*",
]
[tool.ruff]
extend-exclude = [
"cx_Freeze/importshed/*.pyi",
]
line-length = 79
target-version = "py39"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ANN2", # flake8-annotations - missing return type
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"D", # pydocstyle
"DTZ", # flake8-datetimez
"E", "W", # pycodestyle
"EXE", # flake8-executable
"EM", # flake8-errmsg
"ERA", # eradicate
"F", # flake8
"FA", # flake8-future-annotations
"FLY", # flynt
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"ISC003", # flake8-implicit-str-concat - explicit-string-concatenation
"LOG", # flake8-logging
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PLC", "PLE", "PLR", "PLW", # pylint
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"Q004", # flake8-quotes - unnecessary-escaped-quote
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
# ignored for now, but should be revised in future
# last revised using ruff 0.3.4
"C901", # mccabe - {name} is too complex ({complexity} > {max_complexity})
"D102", # Missing docstring in public method
"D401", # First line of docstring should be in imperative mood
"FIX", # flake8-fixme
"PERF203",# `try`-`except` within a loop incurs performance overhead
# ignore the following
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"D203", "D205", "D213",
"PLR2004", # magic-value-comparison
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"PYI021", # Docstrings should not be included in stubs
"T20", # flake8-print
"TD", # flake8-todos
# avoid the rules that may cause conflict with formatter
"COM812", "COM819",
"D206", "D300",
"E111", "E114", "E117", "E501",
"ISC001", "ISC002",
"Q000", "Q001", "Q002", "Q003",
"W191",
# prone to false positives (https://github.com/astral-sh/ruff/issues/4045)
"S603",
]
typing-modules = ["cx_Freeze._typing"]
[tool.ruff.lint.per-file-ignores]
"cx_Freeze/command/_pydialog.py" = ["ERA001"]
"cx_Freeze/command/bdist_msi.py" = ["ERA001"]
"cx_Freeze/initscripts/*" = ["S102"]
"samples/*" = ["D1"]
"tests/*" = ["S101"]
[tool.ruff.lint.flake8-unused-arguments]
ignore-variadic-names = true