2021-02-25 09:05:10 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-02-25 09:14:23 +00:00
|
|
|
, fetchFromGitHub
|
2021-02-25 09:05:10 +00:00
|
|
|
, geojson
|
|
|
|
, pysocks
|
2021-02-25 09:14:23 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, pytestCheckHook
|
2021-02-25 09:05:10 +00:00
|
|
|
}:
|
2018-05-07 11:35:40 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyowm";
|
2021-02-25 09:05:10 +00:00
|
|
|
version = "3.2.0";
|
|
|
|
disabled = pythonOlder "3.7";
|
2019-08-22 13:51:59 +01:00
|
|
|
|
2021-02-25 09:14:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "csparpa";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0sq8rxcgdiayl5gy4qhkvvsdq1d93sbzn0nfg8f1vr8qxh8qkfq4";
|
2018-05-07 11:35:40 +01:00
|
|
|
};
|
|
|
|
|
2021-02-25 09:05:10 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
geojson
|
|
|
|
pysocks
|
|
|
|
requests
|
|
|
|
];
|
2018-05-07 11:35:40 +01:00
|
|
|
|
2021-02-25 09:14:23 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
# Run only tests which don't require network access
|
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
2018-06-22 10:48:21 +01:00
|
|
|
|
2021-02-25 09:14:23 +00:00
|
|
|
pythonImportsCheck = [ "pyowm" ];
|
2018-06-22 10:48:21 +01:00
|
|
|
|
2018-05-07 11:35:40 +01:00
|
|
|
meta = with lib; {
|
2021-02-25 09:05:10 +00:00
|
|
|
description = "Python wrapper around the OpenWeatherMap web API";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pyowm.readthedocs.io/";
|
2018-05-07 11:35:40 +01:00
|
|
|
license = licenses.mit;
|
2021-02-25 09:14:23 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2018-05-07 11:35:40 +01:00
|
|
|
};
|
|
|
|
}
|