3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #85246 from matthewbauer/use-system-libraries-for-grpcio

python.pkgs.grpcio: use system openssl, zlib, and c-ares
This commit is contained in:
Matthew Bauer 2020-04-27 14:46:03 -05:00 committed by GitHub
commit 712026ead1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
{ stdenv, buildPythonPackage, darwin, grpc { stdenv, buildPythonPackage, darwin, grpc
, six, protobuf, enum34, futures, isPy27, pkgconfig , six, protobuf, enum34, futures, isPy27, pkgconfig
, cython}: , cython, c-ares, openssl, zlib }:
buildPythonPackage rec { buildPythonPackage rec {
inherit (grpc) src version; inherit (grpc) src version;
@ -9,11 +9,16 @@ buildPythonPackage rec {
nativeBuildInputs = [ cython pkgconfig ] nativeBuildInputs = [ cython pkgconfig ]
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools; ++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
buildInputs = [ c-ares openssl zlib ];
propagatedBuildInputs = [ six protobuf ] propagatedBuildInputs = [ six protobuf ]
++ stdenv.lib.optionals (isPy27) [ enum34 futures ]; ++ stdenv.lib.optionals (isPy27) [ enum34 futures ];
preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR"; preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR";
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1;
GRPC_PYTHON_BUILD_SYSTEM_CARES = 1;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "HTTP/2-based RPC framework"; description = "HTTP/2-based RPC framework";
license = licenses.asl20; license = licenses.asl20;