1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/pyowm/default.nix
Maximilian Bosch a25dcb6607 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
2018-09-12 01:23:36 +02:00

30 lines
740 B
Nix

{ lib, buildPythonPackage, fetchPypi, requests, geojson }:
buildPythonPackage rec {
pname = "pyowm";
version = "2.9.0";
src = fetchPypi {
inherit pname version;
sha256 = "ed175873823a2fedb48e453505c974ca39f3f75006ef1af54fdbcf72e6796849";
};
propagatedBuildInputs = [ requests geojson ];
# This may actually break the package.
postPatch = ''
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
doCheck = false;
meta = with lib; {
description = "A Python wrapper around the OpenWeatherMap web API";
homepage = https://pyowm.readthedocs.io/;
license = licenses.mit;
};
}