2021-02-25 01:05:10 -08:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, geojson
|
|
|
|
, pysocks
|
|
|
|
}:
|
2018-05-07 03:35:40 -07:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyowm";
|
2021-02-25 01:05:10 -08:00
|
|
|
version = "3.2.0";
|
|
|
|
disabled = pythonOlder "3.7";
|
2019-08-22 05:51:59 -07:00
|
|
|
|
2018-05-07 03:35:40 -07:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-25 01:05:10 -08:00
|
|
|
sha256 = "sha256-o9QL2KtZdRa/uFq+tq8LDm5jRovNuma96qOSDK/hqN4=";
|
2018-05-07 03:35:40 -07:00
|
|
|
};
|
|
|
|
|
2021-02-25 01:05:10 -08:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
geojson
|
|
|
|
pysocks
|
|
|
|
requests
|
|
|
|
];
|
2018-05-07 03:35:40 -07:00
|
|
|
|
2018-06-22 02:48:21 -07:00
|
|
|
# This may actually break the package.
|
|
|
|
postPatch = ''
|
2018-09-11 16:23:36 -07:00
|
|
|
substituteInPlace setup.py \
|
2019-08-22 05:53:50 -07:00
|
|
|
--replace "requests>=2.18.2,<2.19" "requests"
|
2018-06-22 02:48:21 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
2021-02-25 01:05:10 -08:00
|
|
|
pythonImportsCheck = [ "" ];
|
2018-06-22 02:48:21 -07:00
|
|
|
|
2018-05-07 03:35:40 -07:00
|
|
|
meta = with lib; {
|
2021-02-25 01:05:10 -08:00
|
|
|
description = "Python wrapper around the OpenWeatherMap web API";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://pyowm.readthedocs.io/";
|
2018-05-07 03:35:40 -07:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|