From a25dcb66077310067ca1b59b2f38046bee752b0a Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 12 Sep 2018 01:23:36 +0200 Subject: [PATCH] python3Packages.pyowm: fix python3 build (#46549) See https://hydra.nixos.org/build/80714323 Version 2.9 requires `geojson==2.x'. To allow 2.4, the constraint required some patching using `substituteInPlace'. Addresses #45960 --- pkgs/development/python-modules/pyowm/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyowm/default.nix b/pkgs/development/python-modules/pyowm/default.nix index 58a8dee155a8..c853965469a9 100644 --- a/pkgs/development/python-modules/pyowm/default.nix +++ b/pkgs/development/python-modules/pyowm/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, requests }: +{ lib, buildPythonPackage, fetchPypi, requests, geojson }: buildPythonPackage rec { pname = "pyowm"; @@ -9,11 +9,13 @@ buildPythonPackage rec { sha256 = "ed175873823a2fedb48e453505c974ca39f3f75006ef1af54fdbcf72e6796849"; }; - propagatedBuildInputs = [ requests ]; + propagatedBuildInputs = [ requests geojson ]; # This may actually break the package. postPatch = '' - substituteInPlace setup.py --replace "requests>=2.18.2,<2.19" "requests" + substituteInPlace setup.py \ + --replace "requests>=2.18.2,<2.19" "requests" \ + --replace "geojson>=2.3.0,<2.4" "geojson<2.5,>=2.3.0" ''; # No tests in archive