forked from pyodide/pyodide-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
167 lines (147 loc) · 4.09 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "pyodide-build"
authors = [{name = "Pyodide developers"}]
description = '"Tools for building Pyodide"'
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: OS Independent",
]
license = {text = "MPL-2.0"}
requires-python = ">=3.12"
dependencies = [
"build~=1.2.0",
"pyodide-cli~=0.2.1",
"pyodide-lock==0.1.0a7",
"auditwheel-emscripten~=0.0.9",
"pydantic>=2,<3",
"cmake>=3.24",
"wheel",
"ruamel.yaml",
"packaging",
"virtualenv",
"requests",
"typer",
"rich",
# TODO: make this a extra dependency
"resolvelib",
"unearth~=0.6",
]
dynamic = ["version"]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://github.com/pyodide/pyodide-build"
"Bug Tracker" = "https://github.com/pyodide/pyodide-build/issues"
Documentation = "https://pyodide.org/en/stable/"
[project.entry-points."pipx.run"]
pyodide = "pyodide_cli.__main__:main"
[project.entry-points."pyodide.cli"]
build = "pyodide_build.cli.build:main"
build-recipes = "pyodide_build.cli.build_recipes:build_recipes"
build-recipes-no-deps = "pyodide_build.cli.build_recipes:build_recipes_no_deps"
venv = "pyodide_build.cli.venv:main"
skeleton = "pyodide_build.cli.skeleton:app"
py-compile = "pyodide_build.cli.py_compile:main"
config = "pyodide_build.cli.config:app"
create-zipfile = "pyodide_build.cli.create_zipfile:main"
xbuildenv = "pyodide_build.cli.xbuildenv:app"
[project.optional-dependencies]
test = [
"pytest",
"pytest-httpserver",
"pytest-cov",
"types-requests",
]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.sdist]
exclude = [
"/pyodide_build/tests",
]
[tool.mypy]
python_version = "3.12"
mypy_path = ["pyodide_build"]
show_error_codes = true
warn_unreachable = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
plugins = ["pydantic.mypy"]
# Strict checks
warn_unused_configs = true
check_untyped_defs = true
disallow_any_generics = true
disallow_subclassing_any = false
disallow_untyped_calls = false
disallow_untyped_defs = false
disallow_incomplete_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = false
no_implicit_reexport = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"loky",
"ruamel.yaml",
"termcolor",
"test",
"tomli",
"tomllib",
"typer",
"virtualenv",
"auditwheel_emscripten.*"
]
ignore_missing_imports = true
[tool.ruff]
lint.select = [
"B0", # bugbear (all B0* checks enabled by default)
"B904", # bugbear (Within an except clause, raise exceptions with raise ... from err)
"B905", # bugbear (zip() without an explicit strict= parameter set.)
"C9", # mccabe complexity
"E", # pycodestyles
"W", # pycodestyles
"F", # pyflakes
"I", # isort
"PGH", # pygrep-hooks
"PLC", # pylint conventions
"PLE", # pylint errors
"UP", # pyupgrade
"G004", # f-string logging should be avoided
]
lint.logger-objects = ["pyodide_build.logger.logger"]
lint.ignore = ["E402", "E501", "E731", "E741", "UP038"]
# line-length = 219 # E501: Recommended goal is 88 to match black
target-version = "py311"
[tool.ruff.lint.per-file-ignores]
"src/py/_pyodide/_base.py" = [
"PGH001", # No builtin `eval()` allowed
]
"src/tests/test_jsproxy.py" = [
"PGH001", # No builtin `eval()` allowed
]
"src/tests/test_typeconversions.py" = [
"PGH001", # No builtin `eval()` allowed
]
"tools/*" = [
"B008", # Do not perform function call `typer.Optional` in argument defaults
]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["typer.Argument", "typer.Option"]
[tool.ruff.lint.isort]
known-first-party = [
"pyodide_build",
]
known-third-party = [
"build",
"pyodide_lock",
]
[tool.ruff.lint.mccabe]
max-complexity = 31 # C901: Recommended goal is 10
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"