1{ lib, buildPythonPackage, fetchPypi, requests, geojson }:
2
3buildPythonPackage rec {
4 pname = "pyowm";
5 version = "2.10.0";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "8fd41a18536f4d6c432bc6d9ea69994efb1ea9b43688cf19523659b6f4d86cf7";
10 };
11
12 propagatedBuildInputs = [ requests geojson ];
13
14 # This may actually break the package.
15 postPatch = ''
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"
19 '';
20
21 # No tests in archive
22 doCheck = false;
23
24 meta = with lib; {
25 description = "A Python wrapper around the OpenWeatherMap web API";
26 homepage = https://pyowm.readthedocs.io/;
27 license = licenses.mit;
28 };
29}