Skip to content

Commit 312c8f1

Browse files
committed
Use maturin
1 parent a478cfa commit 312c8f1

File tree

6 files changed

+12
-118
lines changed

6 files changed

+12
-118
lines changed

MANIFEST.in

Lines changed: 3 additions & 0 deletions
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

Lines changed: 0 additions & 28 deletions
This file was deleted.

pyproject.toml

Lines changed: 5 additions & 37 deletions
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 = "python scripts/setup_bridge.py develop"
7256
build-develop-with-release = { cmd = "python scripts/setup_bridge.py develop", env = { TEMPORAL_BUILD_RELEASE = "1" }}
@@ -219,28 +203,12 @@ exclude = [
219203
[tool.ruff]
220204
target-version = "py39"
221205

222-
223-
# We need to include proto source that is otherwise excluded via .gitignore.
224-
# We have chosen to keep all source including Rust source in precompiled wheels
225-
# for easy viewing. It is also complicated to exclude certain pieces for wheels
226-
# with Poetry (see https://github.com/python-poetry/poetry/issues/3380).
227-
include = ["temporalio/api/**/*", "temporalio/bridge/proto/**/*"]
228-
exclude = ["temporalio/bridge/**/target"]
229-
230-
# Known undocumented API for hooking into setup. Unfortunately Poetry does not
231-
# support this script in a subdirectory like scripts/.
232-
[tool.poetry.build]
233-
script = "build.py"
234-
# In https://github.com/python-poetry/poetry-core/pull/318, Poetry stopped using
235-
# a setup file, but we are using setuptools Rust manually in our build.py which
236-
# needs a setup file.
237-
# TODO(cretz): Find a way to not require a setup file since that is going away
238-
# at some point in Poetry. Revisit Maturin or find some other approach.
239-
generate-setup-file = true
240-
241206
[build-system]
242-
build-backend = "poetry.core.masonry.api"
243-
requires = ["poetry-core>=1.0.0", "setuptools", "wheel", "setuptools-rust"]
207+
requires = ["maturin>=1.0,<2.0"]
208+
build-backend = "maturin"
209+
210+
[tool.maturin]
211+
manifest-path = "temporalio/bridge/Cargo.toml"
244212

245213
[tool.uv]
246214
# Prevent uv commands from building the package by default

scripts/setup_bridge.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

temporalio/bridge/Cargo.toml

Lines changed: 4 additions & 0 deletions
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

Lines changed: 0 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)