Skip to content

Commit

Permalink
python3Packages.pyowm: fix python3 build (#46549)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ma27 authored and xeji committed Sep 11, 2018
1 parent 8d4248a commit a25dcb6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkgs/development/python-modules/pyowm/default.nix
@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, requests }:
{ lib, buildPythonPackage, fetchPypi, requests, geojson }:

buildPythonPackage rec {
pname = "pyowm";
Expand All @@ -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
Expand Down

0 comments on commit a25dcb6

Please sign in to comment.