-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
pyproject.toml
87 lines (73 loc) · 2.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
# ===== Project info
[project]
dynamic = ["version"]
name = "wgpu"
description = "WebGPU for Python"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "Almar Klein" }, { name = "Korijn van Golen" }]
keywords = ["webgpu", "wgpu", "vulkan", "metal", "DX12", "opengl"]
requires-python = ">= 3.9"
dependencies = ["cffi>=1.15.0", "rubicon-objc>=0.4.1; sys_platform == 'darwin'"]
[project.optional-dependencies]
# For users
jupyter = ["jupyter_rfb>=0.4.2"]
glfw = ["glfw>=1.9"]
imgui = ["imgui-bundle>=1.2.1"]
# For devs / ci
build = ["build", "hatchling", "requests", "twine"]
codegen = ["pytest", "numpy", "ruff"]
lint = ["ruff", "pre-commit"]
tests = ["numpy", "pytest", "psutil", "imageio"]
examples = []
docs = ["sphinx>7.2", "sphinx_rtd_theme"]
dev = ["wgpu[build,codegen,lint,tests,examples,docs]"]
[project.entry-points."pyinstaller40"]
hook-dirs = "wgpu.__pyinstaller:get_hook_dirs"
tests = "wgpu.__pyinstaller:get_test_dirs"
[project.urls]
Homepage = "https://github.com/pygfx/wgpu-py"
Documentation = "https://wgpu-py.readthedocs.io"
Repository = "https://github.com/pygfx/wgpu-py"
# ===== Building
#
# There are a variety of build backends, e.g.:
# * setuptools: need this if you have a setup.py
# * flit: really nice for pure Python libs.
# * hatchling: modern, with pretty good defaults, and configurable. Just right for us!
# * mesonpy: numpy, scikit-image, et al. use this because they compile stuff.
[build-system]
requires = ["requests", "hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "wgpu/_version.py"
[tool.hatch.build.targets.sdist]
packages = ["wgpu"]
exclude = ["*.so", "*.dll", "*.dylib"]
force-include = { "tools" = "tools" }
[tool.hatch.build.targets.wheel]
packages = ["wgpu"]
artifacts = ["*.so", "*.dll", "*.dylib"]
# We use a hatch build hook to install the correct wgpu-native lib right before
# the wheel is build, and to allow cross-platform builds. See the tools dir.
[tool.hatch.build.targets.wheel.hooks.custom]
path = "tools/hatch_build.py"
# ===== Tooling
[tool.ruff]
line-length = 88
[tool.ruff.lint]
select = ["F", "E", "W", "N", "B", "RUF"]
ignore = [
"E501", # Line too long
"E731", # Do not assign a `lambda` expression, use a `def`
"B006", # Do not use mutable data structures for argument defaults
"B007", # Loop control variable `x` not used within loop body
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
]
[tool.coverage.report]
exclude_also = [
# Have to re-enable the standard pragma, plus a less-ugly flavor
"pragma: no cover",
"no-cover",
"raise NotImplementedError",
]