git.iko.soy/typeable/nixpkgs
on master help sign in
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

commita25dcb66077310067ca1b59b2f38046bee752b0a authorMaximilian Bosch <maximilian@mbosch.me> dateWed 12 Sep 2018, 01:23 (8 years ago) parent8d4248a
1 file changed+5−3
pkgs/development/python-modules/pyowm/default.nix+5−3
pkgs/development/python-modules/pyowm/default.nix+5−3
@@ -1,4 +1,4 @@
1−{ lib, buildPythonPackage, fetchPypi, requests }:
1+{ lib, buildPythonPackage, fetchPypi, requests, geojson }:
22
33buildPythonPackage rec {
44 pname = "pyowm";
@@ -9,11 +9,13 @@ buildPythonPackage rec {
99 sha256 = "ed175873823a2fedb48e453505c974ca39f3f75006ef1af54fdbcf72e6796849";
1010 };
1111
12− propagatedBuildInputs = [ requests ];
12+ propagatedBuildInputs = [ requests geojson ];
1313
1414 # This may actually break the package.
1515 postPatch = ''
16− substituteInPlace setup.py --replace "requests>=2.18.2,<2.19" "requests"
16+ substituteInPlace setup.py \
17+ --replace "requests>=2.18.2,<2.19" "requests" \
18+ --replace "geojson>=2.3.0,<2.4" "geojson<2.5,>=2.3.0"
1719 '';
1820
1921 # No tests in archive