Skip to content

Commit 14ff378

Browse files
committed
Use maturin
1 parent 5b7e814 commit 14ff378

File tree

6 files changed

+12
-118
lines changed

6 files changed

+12
-118
lines changed

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
recursive-include temporalio/api *
2+
recursive-include temporalio/bridge/proto *
3+
recursive-exclude temporalio/bridge/**/target *

build.py

-28
This file was deleted.

pyproject.toml

+5-37
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,12 @@ dev = [
4545
"pytest-asyncio>=0.21,<0.22",
4646
"pytest-timeout~=2.2",
4747
"ruff>=0.5.0,<0.6",
48-
"setuptools>=65.0.0",
49-
"setuptools-rust>=1.3.0",
5048
"toml>=0.10.2,<0.11",
5149
"twine>=4.0.1,<5",
5250
"wheel>=0.42.0,<0.43",
5351
"ruff>=0.5.0,<0.6",
5452
]
5553

56-
[tool.hatch.build.targets.sdist]
57-
include = [
58-
"temporalio/api/**/*",
59-
"temporalio/bridge/proto/**/*",
60-
]
61-
exclude = ["temporalio/bridge/**/target"]
62-
63-
[tool.hatch.build.targets.wheel]
64-
include = [
65-
"temporalio/api/**/*",
66-
"temporalio/bridge/proto/**/*",
67-
]
68-
exclude = ["temporalio/bridge/**/target"]
69-
7054
[tool.poe.tasks]
7155
build-develop = "uv run python scripts/setup_bridge.py develop"
7256
build-develop-with-release = { cmd = "uv run python scripts/setup_bridge.py develop", env = { TEMPORAL_BUILD_RELEASE = "1" }}
@@ -203,28 +187,12 @@ exclude = [
203187
[tool.ruff]
204188
target-version = "py39"
205189

206-
207-
# We need to include proto source that is otherwise excluded via .gitignore.
208-
# We have chosen to keep all source including Rust source in precompiled wheels
209-
# for easy viewing. It is also complicated to exclude certain pieces for wheels
210-
# with Poetry (see https://github.com/python-poetry/poetry/issues/3380).
211-
include = ["temporalio/api/**/*", "temporalio/bridge/proto/**/*"]
212-
exclude = ["temporalio/bridge/**/target"]
213-
214-
# Known undocumented API for hooking into setup. Unfortunately Poetry does not
215-
# support this script in a subdirectory like scripts/.
216-
[tool.poetry.build]
217-
script = "build.py"
218-
# In https://github.com/python-poetry/poetry-core/pull/318, Poetry stopped using
219-
# a setup file, but we are using setuptools Rust manually in our build.py which
220-
# needs a setup file.
221-
# TODO(cretz): Find a way to not require a setup file since that is going away
222-
# at some point in Poetry. Revisit Maturin or find some other approach.
223-
generate-setup-file = true
224-
225190
[build-system]
226-
build-backend = "poetry.core.masonry.api"
227-
requires = ["poetry-core>=1.0.0", "setuptools", "wheel", "setuptools-rust"]
191+
requires = ["maturin>=1.0,<2.0"]
192+
build-backend = "maturin"
193+
194+
[tool.maturin]
195+
manifest-path = "temporalio/bridge/Cargo.toml"
228196

229197
[tool.uv]
230198
# Prevent uv commands from building the package by default

scripts/setup_bridge.py

-27
This file was deleted.

temporalio/bridge/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name = "temporal-sdk-bridge"
33
version = "0.1.0"
44
edition = "2021"
55

6+
[package.metadata.maturin]
7+
module-name = "temporalio.bridge.temporal_sdk_bridge"
8+
9+
610
[lib]
711
name = "temporal_sdk_bridge"
812
crate-type = ["cdylib"]

uv.lock

-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)