2018-09-11 23:23:36 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, requests, geojson }:
|
2018-05-07 10:35:40 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyowm";
|
2019-02-14 07:37:26 +00:00
|
|
|
version = "2.10.0";
|
2018-05-07 10:35:40 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-14 07:37:26 +00:00
|
|
|
sha256 = "8fd41a18536f4d6c432bc6d9ea69994efb1ea9b43688cf19523659b6f4d86cf7";
|
2018-05-07 10:35:40 +00:00
|
|
|
};
|
|
|
|
|
2018-09-11 23:23:36 +00:00
|
|
|
propagatedBuildInputs = [ requests geojson ];
|
2018-05-07 10:35:40 +00:00
|
|
|
|
2018-06-22 09:48:21 +00:00
|
|
|
# This may actually break the package.
|
|
|
|
postPatch = ''
|
2018-09-11 23:23:36 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "requests>=2.18.2,<2.19" "requests" \
|
|
|
|
--replace "geojson>=2.3.0,<2.4" "geojson<2.5,>=2.3.0"
|
2018-06-22 09:48:21 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-05-07 10:35:40 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python wrapper around the OpenWeatherMap web API";
|
|
|
|
homepage = https://pyowm.readthedocs.io/;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|