Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.temporalio: init at 1.8.0 #353720

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions pkgs/development/python-modules/temporalio/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
lib,
stdenv,
buildPythonPackage,
cargo,
fetchFromGitHub,
pythonOlder,
poetry-core,
protobuf,
python-dateutil,
rustc,
rustPlatform,
setuptools,
setuptools-rust,
types-protobuf,
typing-extensions,
}:

buildPythonPackage rec {
pname = "temporalio";
version = "1.8.0";
pyproject = true;

src = fetchFromGitHub {
owner = "temporalio";
repo = "sdk-python";
rev = "refs/tags/${version}";
hash = "sha256-xJIb+U3hV6DDvfbfY20U/4rE2z0XzaESkehtcvG6m50=";
fetchSubmodules = true;
};

cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
sourceRoot = "${src.name}/${cargoRoot}";
hash = "sha256-+A226LfxqmUA/CMXwx8osgIRJhfKtB8KcCSBkbbXOHk=";
};

cargoRoot = "temporalio/bridge";

patches = [ ./protoc-wheel-removal.diff ];

build-system = [
poetry-core
setuptools
setuptools-rust
];

dependencies = [
protobuf
python-dateutil
types-protobuf
];

nativeBuildInputs = [
cargo
rustPlatform.cargoSetupHook
rustc
];

propagatedBuildInputs = [ typing-extensions ];

pythonImportsCheck = [
"temporalio"
"temporalio.client"
"temporalio.worker"
];

meta = {
description = "Temporal Python SDK";
homepage = "https://temporal.io/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jpds ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--- ./pyproject.toml 2024-10-30 22:07:04.852594423 +0000
+++ ./pyproject.toml 2024-10-30 22:07:16.851578125 +0000
@@ -215,4 +215,4 @@ target-version = "py38"

[build-system]
build-backend = "poetry.core.masonry.api"
-requires = ["poetry-core>=1.0.0", "setuptools", "wheel", "setuptools-rust", "protoc-wheel-0"]
+requires = ["poetry-core>=1.0.0", "setuptools", "wheel", "setuptools-rust"]
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15493,6 +15493,8 @@ self: super: with self; {

tempora = callPackage ../development/python-modules/tempora { };

temporalio = callPackage ../development/python-modules/temporalio { };

tenacity = callPackage ../development/python-modules/tenacity { };

tencentcloud-sdk-python = callPackage ../development/python-modules/tencentcloud-sdk-python { };
Expand Down