Skip to content

Commit 6518847

Browse files
committed
Update and add build-native
1 parent c00835c commit 6518847

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,13 @@ known-third-party = ["dissect"]
9191
[tool.setuptools.packages.find]
9292
include = ["dissect.*"]
9393

94+
[tool.setuptools.exclude-package-data]
95+
"*" = ["_native.src/*"]
96+
9497
[tool.setuptools_scm]
9598

96-
[tool.maturin]
97-
module-name = "dissect.util._native"
98-
manifest-path = "dissect/util/_native.src/Cargo.toml"
99+
[[tool.setuptools-rust.ext-modules]]
100+
target = "dissect.util._native"
101+
path = "dissect/util/_native.src/Cargo.toml"
99102
features = ["pyo3/extension-module"]
103+
strip = "All"

tox.ini

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@ minversion = 4.4.3
1111
# the proper version resolving with (sub-)dependencies defining dev extra's.
1212
requires = virtualenv>=20.24.6
1313

14+
[pkgenv]
15+
deps =
16+
setuptools-rust
17+
config_settings_build_wheel = --build-option=--py-limited-api=cp39
18+
1419
[testenv]
20+
package = wheel
1521
deps =
1622
pytest
1723
pytest-cov
1824
coverage
1925
commands =
20-
pytest --basetemp="{envtmpdir}" {posargs:--color=yes --cov=dissect --cov-report=term-missing -v tests}
26+
pytest --basetemp="{envtmpdir}" --import-mode="append" {posargs:--color=yes --cov=dissect --cov-report=term-missing -v tests}
2127
coverage report
2228
coverage xml
2329

@@ -38,6 +44,16 @@ deps =
3844
commands =
3945
pyproject-build
4046

47+
[testenv:build-native]
48+
package = skip
49+
deps =
50+
build
51+
setuptools>=77.0.0
52+
setuptools_scm[toml]>=6.4.0
53+
setuptools-rust
54+
commands =
55+
pyproject-build --wheel --no-isolation --config-setting=--build-option=--py-limited-api=cp39
56+
4157
[testenv:fix]
4258
package = skip
4359
deps =

0 commit comments

Comments
 (0)