From f6dfe13ef9305320d42d254561cb42022cde56a0 Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Mon, 24 Oct 2022 20:12:14 -0700 Subject: python3Packages.apache-beam: relax protobuf dependency to fix build --- .../python-modules/apache-beam/default.nix | 27 +++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'pkgs/development/python-modules/apache-beam') diff --git a/pkgs/development/python-modules/apache-beam/default.nix b/pkgs/development/python-modules/apache-beam/default.nix index 508d6670c6d20..ec7555b224929 100644 --- a/pkgs/development/python-modules/apache-beam/default.nix +++ b/pkgs/development/python-modules/apache-beam/default.nix @@ -27,18 +27,20 @@ , pymongo , pytestCheckHook , python -, pythonAtLeast , python-dateutil +, pythonAtLeast +, pythonRelaxDepsHook , pytz , pyyaml , requests , requests-mock +, scikit-learn , setuptools , sqlalchemy , tenacity -, typing-extensions , testcontainers -, scikit-learn }: +, typing-extensions +}: buildPythonPackage rec { pname = "apache-beam"; @@ -51,14 +53,16 @@ buildPythonPackage rec { sha256 = "sha256-0S7Dj6PMSbZkEAY6ZLUpKVfe/tFxsq60TTAFj0Qhtv0="; }; - # See https://github.com/NixOS/nixpkgs/issues/156957. - postPatch = '' - substituteInPlace setup.py \ - --replace "dill>=0.3.1.1,<0.3.2" "dill" \ - --replace "pyarrow>=0.15.1,<8.0.0" "pyarrow" \ - --replace "numpy>=1.14.3,<1.23.0" "numpy" \ - --replace "pymongo>=3.8.0,<4.0.0" "pymongo" - ''; + pythonRelaxDeps = [ + # See https://github.com/NixOS/nixpkgs/issues/156957 + "dill" + "numpy" + "pyarrow" + "pymongo" + + # See https://github.com/NixOS/nixpkgs/issues/193613 + "protobuf" + ]; sourceRoot = "source/sdks/python"; @@ -66,6 +70,7 @@ buildPythonPackage rec { cython grpcio-tools mypy-protobuf + pythonRelaxDepsHook ]; propagatedBuildInputs = [ -- cgit 1.4.1