about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-04-28 23:51:43 +0200
committerYt <happysalada@proton.me>2023-04-28 18:57:03 -0400
commit3317543699a82f442800fbaca45bf68d43f0aa04 (patch)
tree8e2d78a342265bf0a3903f36e076af3ee6965973
parentc3f48fc86fe7f422ac56c37e3695f3e778016df7 (diff)
python310Packages.grpcio-testing: init at 1.54.0
-rw-r--r--pkgs/development/python-modules/grpcio-testing/default.nix45
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/grpcio-testing/default.nix b/pkgs/development/python-modules/grpcio-testing/default.nix
new file mode 100644
index 0000000000000..7aaadfa409e01
--- /dev/null
+++ b/pkgs/development/python-modules/grpcio-testing/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, grpcio
+, protobuf
+, pythonOlder
+, pythonRelaxDepsHook
+}:
+
+buildPythonPackage rec {
+  pname = "grpcio-testing";
+  version = "1.54.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-/0LlPGUVhV7lh4RDQH7wImxaynN2wDLoELxoUUG8bpM=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "'grpcio>={version}'.format(version=grpc_version.VERSION)" "'grpcio'"
+  '';
+
+  propagatedBuildInputs = [
+    grpcio
+    protobuf
+  ];
+
+  pythonImportsCheck = [
+    "grpc_testing"
+  ];
+
+  # Module has no tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Testing utilities for gRPC Python";
+    homepage = "https://grpc.io/";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index b3a863b36b688..76448aad835b4 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4268,6 +4268,8 @@ self: super: with self; {
 
   grpcio-tools = callPackage ../development/python-modules/grpcio-tools { };
 
+  grpcio-testing = callPackage ../development/python-modules/grpcio-testing { };
+
   grpclib = callPackage ../development/python-modules/grpclib { };
 
   gruut = callPackage ../development/python-modules/gruut { };