2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2021-01-09 10:05:03 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, grpc
|
|
|
|
, six
|
|
|
|
, protobuf
|
2021-04-26 19:14:03 +00:00
|
|
|
, enum34 ? null
|
|
|
|
, futures ? null
|
2021-01-09 10:05:03 +00:00
|
|
|
, isPy27
|
|
|
|
, pkg-config
|
|
|
|
, cython
|
|
|
|
, c-ares
|
|
|
|
, openssl
|
|
|
|
, zlib
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
inherit (grpc) src version;
|
|
|
|
pname = "grpcio";
|
2022-11-02 22:02:43 +00:00
|
|
|
format = "setuptools";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ cython pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
buildInputs = [ c-ares openssl zlib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ six protobuf ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optionals (isPy27) [ enum34 futures ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
preBuild = lib.optionalString stdenv.isDarwin "unset AR";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
GRPC_BUILD_WITH_BORING_SSL_ASM = "";
|
2020-05-03 17:38:23 +00:00
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
|
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1;
|
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_CARES = 1;
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
# does not contain any tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "grpc" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "HTTP/2-based RPC framework";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://grpc.io/grpc/python/";
|
2021-01-09 10:05:03 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|