From c71bcb2744c4a78dccf96716789602e3c41a0fac Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sat, 24 Mar 2018 19:36:06 +0100 Subject: [PATCH] grpcio: use protobuf3_5 --- pkgs/development/python-modules/google_api_core/default.nix | 4 ++-- .../python-modules/google_cloud_speech/default.nix | 5 ++--- pkgs/development/python-modules/google_gax/default.nix | 5 +++-- .../python-modules/googleapis_common_protos/default.nix | 4 ++-- pkgs/development/python-modules/grpcio/default.nix | 4 ++-- pkgs/top-level/python-packages.nix | 6 ++++++ 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/google_api_core/default.nix b/pkgs/development/python-modules/google_api_core/default.nix index 2899eeb4a8a..df148b1ede3 100644 --- a/pkgs/development/python-modules/google_api_core/default.nix +++ b/pkgs/development/python-modules/google_api_core/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi -, google_auth, protobuf, googleapis_common_protos, requests, grpcio, setuptools, mock, pytest }: +, google_auth, protobuf3_5, googleapis_common_protos, requests, grpcio, setuptools, mock, pytest }: buildPythonPackage rec { pname = "google-api-core"; @@ -10,7 +10,7 @@ buildPythonPackage rec { sha256 = "0144d467083ed54d2e8ccb4212d42c3724fe0b844b7d3a0ff85aea54b7ae8347"; }; - propagatedBuildInputs = [ google_auth protobuf googleapis_common_protos requests grpcio ]; + propagatedBuildInputs = [ google_auth protobuf3_5 googleapis_common_protos requests grpcio ]; checkInputs = [ setuptools mock pytest ]; checkPhase = '' diff --git a/pkgs/development/python-modules/google_cloud_speech/default.nix b/pkgs/development/python-modules/google_cloud_speech/default.nix index 9912316941f..75c14ff62eb 100644 --- a/pkgs/development/python-modules/google_cloud_speech/default.nix +++ b/pkgs/development/python-modules/google_cloud_speech/default.nix @@ -13,9 +13,8 @@ buildPythonPackage rec { propagatedBuildInputs = [ setuptools google_api_core google_gax google_cloud_core ]; checkInputs = [ pytest mock ]; - checkPhase = '' - py.test - ''; + # needs credentials + doCheck = false; meta = with stdenv.lib; { description = "Cloud Speech API enables integration of Google speech recognition into applications."; diff --git a/pkgs/development/python-modules/google_gax/default.nix b/pkgs/development/python-modules/google_gax/default.nix index 24000161338..a8ac37e7e8c 100644 --- a/pkgs/development/python-modules/google_gax/default.nix +++ b/pkgs/development/python-modules/google_gax/default.nix @@ -1,5 +1,6 @@ { stdenv, buildPythonPackage, fetchPypi -, google_auth, ply, protobuf, grpcio, requests, googleapis_common_protos, dill, future, pytest, mock, unittest2 }: +, google_auth, ply, protobuf3_5, grpcio, requests +, googleapis_common_protos, dill, future, pytest, mock, unittest2 }: buildPythonPackage rec { pname = "google-gax"; @@ -10,7 +11,7 @@ buildPythonPackage rec { sha256 = "0p1ribd2xy7a04wnjv12agkcdi6f9cpj838884hayx07p5g8v3ji"; }; - propagatedBuildInputs = [ google_auth ply protobuf grpcio requests googleapis_common_protos dill future ]; + propagatedBuildInputs = [ google_auth ply protobuf3_5 grpcio requests googleapis_common_protos dill future ]; checkInputs = [ pytest mock unittest2 ]; # Importing test__grpc_google_auth fails with "ModuleNotFoundError: No module named 'google_auth_httplib2'", where diff --git a/pkgs/development/python-modules/googleapis_common_protos/default.nix b/pkgs/development/python-modules/googleapis_common_protos/default.nix index 28e84f4846e..7427e590c0c 100644 --- a/pkgs/development/python-modules/googleapis_common_protos/default.nix +++ b/pkgs/development/python-modules/googleapis_common_protos/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi -, protobuf, pytest }: +, protobuf3_5, pytest }: buildPythonPackage rec { pname = "googleapis-common-protos"; @@ -10,7 +10,7 @@ buildPythonPackage rec { sha256 = "1whfjl44gy15ha6palpwa2m0xi36dsvpaz8vw0cvb2k2lbdfsxf0"; }; - propagatedBuildInputs = [ protobuf ]; + propagatedBuildInputs = [ protobuf3_5 ]; checkInputs = [ pytest ]; doCheck = false; # there are no tests diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix index d1f0903238c..47e9d179eea 100644 --- a/pkgs/development/python-modules/grpcio/default.nix +++ b/pkgs/development/python-modules/grpcio/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi, lib -, six, protobuf, enum34, futures, isPy26, isPy27, isPy34 }: +, six, protobuf3_5, enum34, futures, isPy26, isPy27, isPy34 }: buildPythonPackage rec { pname = "grpcio"; @@ -10,7 +10,7 @@ buildPythonPackage rec { sha256 = "e7c43b5619deff48cc177c1b0618c4beeb2797f910f160e3c2035d5baf790a5d"; }; - propagatedBuildInputs = [ six protobuf ] + propagatedBuildInputs = [ six protobuf3_5 ] ++ lib.optionals (isPy26 || isPy27 || isPy34) [ enum34 ] ++ lib.optionals (isPy26 || isPy27) [ futures ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ca4a13b86df..e11a541a251 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12151,6 +12151,12 @@ in { protobuf = pkgs.protobuf3_1; }; + protobuf3_5 = callPackage ../development/python-modules/protobuf { + disabled = isPyPy; + doCheck = !isPy3k; + protobuf = pkgs.protobuf3_5; + }; + psd-tools = callPackage ../development/python-modules/psd-tools { }; psutil = callPackage ../development/python-modules/psutil { };