nixpkgs/pkgs/development/python-modules/pyowm/default.nix

43 lines
830 B
Nix
Raw Normal View History

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 10:35:40 +00:00
buildPythonPackage rec {
pname = "pyowm";
2021-02-25 09:05:10 +00:00
version = "3.2.0";
disabled = pythonOlder "3.7";
2021-02-25 09:14:23 +00:00
src = fetchFromGitHub {
owner = "csparpa";
repo = pname;
rev = version;
sha256 = "0sq8rxcgdiayl5gy4qhkvvsdq1d93sbzn0nfg8f1vr8qxh8qkfq4";
2018-05-07 10:35:40 +00:00
};
2021-02-25 09:05:10 +00:00
propagatedBuildInputs = [
geojson
pysocks
requests
];
2018-05-07 10:35:40 +00: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 09:48:21 +00:00
2021-02-25 09:14:23 +00:00
pythonImportsCheck = [ "pyowm" ];
2018-06-22 09:48:21 +00:00
2018-05-07 10:35:40 +00:00
meta = with lib; {
2021-02-25 09:05:10 +00:00
description = "Python wrapper around the OpenWeatherMap web API";
homepage = "https://pyowm.readthedocs.io/";
2018-05-07 10:35:40 +00:00
license = licenses.mit;
2021-02-25 09:14:23 +00:00
maintainers = with maintainers; [ fab ];
2018-05-07 10:35:40 +00:00
};
}