File tree Expand file tree Collapse file tree 2 files changed +32
-4
lines changed
Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ requirements: requirements-rs requirements-py ## setup project for development
2323
2424.PHONY: build-py build-rs build dev
2525build-py:
26- maturin build
26+ python -m build -w -n
2727
2828build-rs:
2929 make -C rust build
Original file line number Diff line number Diff line change 11[build-system]
2- requires = ["maturin>=1,< 2 " ]
3- build-backend = " maturin "
2+ requires = ["hatchling", "hatch-rs "]
3+ build-backend="hatchling.build "
44
55[project]
66name = "{{project_name_formatted}}"
@@ -35,9 +35,10 @@ develop = [
3535 "check-manifest",
3636 "cibuildwheel",
3737 "codespell>=2.4,<2 .5 " ,
38+ " hatch-rs " ,
39+ " hatchling " ,
3840 " mdformat >=0.7.22,<0 .8 " ,
3941 " mdformat-tables >=1",
40- "maturin>=1,<2 " ,
4142 "pytest",
4243 "pytest-cov",
4344 "ruff",
@@ -80,6 +81,8 @@ replace = 'version = "{new_version}"'
8081[tool.check-manifest]
8182ignore = [
8283 ".copier-answers.yaml",
84+ "Cargo.toml",
85+ "Cargo.lock",
8386 "Makefile",
8487 "docs/**/*",
8588 "rust/.config/*",
@@ -138,6 +141,31 @@ exclude_also = [
138141ignore_errors = true
139142fail_under = 50
140143
144+ [tool.hatch.build]
145+ artifacts = [
146+ "project/*.dll",
147+ "project/*.dylib",
148+ "project/*.so",
149+ ]
150+
151+ [tool.hatch.build.sources]
152+ src = "/"
153+
154+ [tool.hatch.build.hooks.hatch-rs]
155+ verbose = true
156+ module = "{{module}}"
157+ path = "."
158+
159+ [tool.hatch.build.targets.sdist]
160+ packages = ["{{module}}", "/rust", "/src"]
161+ sources = ["."]
162+
163+ {# [tool.hatch.build.targets.sdist.force-include]
164+ "./src" = "src" #}
165+
166+ [tool.hatch.build.targets.wheel]
167+ packages = ["{{module}}"]
168+
141169[tool.pytest.ini_options]
142170addopts = ["-vvv", "--junitxml=junit.xml"]
143171testpaths = "{{module}}/tests"
You can’t perform that action at this time.
0 commit comments