-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
97 lines (87 loc) · 4.29 KB
/
Copy pathpyproject.toml
File metadata and controls
97 lines (87 loc) · 4.29 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
[build-system]
# cmake builds the bundled libhdf5 from source so `.h5`/`.hdf5` support is compiled
# into the wheel; end users install nothing extra.
requires = ["maturin>=1.8,<2", "cmake>=3.18"]
build-backend = "maturin"
[project]
name = "eventcv"
version = "1.0.6"
description = "Open source event-based computer vision library."
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
authors = [{ name = "Adam Hines"}]
maintainers = [{ name = "EventLAB Team", email="[email protected]"}]
dependencies = ["numpy"]
classifiers = [
# Development status
'Development Status :: 5 - Production/Stable',
# Intended audience
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
# Languages
'Programming Language :: Rust',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'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',
# Topics
'Topic :: Software Development',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Image Recognition',
# Operating Systems
'Operating System :: Microsoft :: Windows',
'Operating System :: Unix',
'Operating System :: MacOS',
]
# `onnx` is a *fallback*, not the way in: the wheels already carry an ONNX Runtime
# (`scripts/fetch_onnxruntime.py` puts it there), so it exists for source and `--no-binary`
# installs, which have no bundled copy. Conda users get the same effect from `onnxruntime-cpp`.
# `test` additionally brings the tools for writing/inspecting HDF5 fixtures and ONNX graphs;
# none of them are needed to use eventcv — the Rust reader links its own libhdf5.
[project.optional-dependencies]
onnx = ["onnxruntime>=1.17"]
# `onnx` below is the PyPI graph-building package used by tests/test_model.py, not this extra.
test = ["h5py>=3", "hdf5plugin", "onnx", "onnxruntime>=1.17"]
# `eventcv --version` reports the installed version and which optional features the wheel was
# built with. `python -m eventcv --version` does the same without the console script on PATH.
[project.scripts]
eventcv = "eventcv.__main__:main"
[project.urls]
homepage = "https://eventcv.net"
documentation = "https://eventcv.readthedocs.io"
source = "https://github.com/EventLAB-Team/eventcv"
[tool.maturin]
bindings = "pyo3"
manifest-path = "crates/eventcv-py/Cargo.toml"
python-source = "python"
module-name = "eventcv._rust"
# Compile HDF5 reading, USB event-camera streaming and ONNX inference into every wheel. `camera`
# pulls in the neuromorphic-drivers crate + a vendored libusb (built from source, no system libusb
# at runtime). `onnx` pulls in ort, which *loads* ONNX Runtime at run time rather than linking a
# prebuilt one in — the static runtime `ort` can fetch is built against glibc 2.38 and made the
# whole extension unloadable on older distros. The flag remains because ort has no stable release
# yet, so a bad RC is turned off here rather than worked around in the API.
# `gpu` adds the compute shaders. It costs almost nothing in the wheel — wgpu is already there for
# the viewer — and the CPU stays the default at run time, so this only decides whether
# `device="gpu"` is available at all rather than whether anything uses it.
features = ["hdf5", "camera", "onnx", "gpu"]
# The ONNX Runtime the wheel carries, put there by `scripts/fetch_onnxruntime.py` before the build
# (CI runs it in every wheel job). `format = "wheel"` because an sdist must not ship a binary — a
# source build finds a runtime elsewhere, or says how to install one. maturin skips gitignored
# files under `python-source`, and `_libs/` is gitignored, so this entry is what carries it.
include = [{ path = "eventcv/_libs/*", format = "wheel" }]
# Keep the docs source, fixtures, and dev-only files out of the sdist (the wheel already
# only contains `python/eventcv/` + the compiled extension). Docs are hosted on Read the
# Docs, so shipping them to PyPI would only bloat the download.
exclude = [
"docs/**",
".readthedocs.yaml",
"data/**",
"assets/**"
]
[tool.uv.extra-build-dependencies]
eventcv = ["maturin"]