1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, geojson
5, pysocks
6, pythonOlder
7, requests
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "pyowm";
13 version = "3.2.0";
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "csparpa";
18 repo = pname;
19 rev = version;
20 sha256 = "0sq8rxcgdiayl5gy4qhkvvsdq1d93sbzn0nfg8f1vr8qxh8qkfq4";
21 };
22
23 propagatedBuildInputs = [
24 geojson
25 pysocks
26 requests
27 ];
28
29 checkInputs = [ pytestCheckHook ];
30
31 # Run only tests which don't require network access
32 pytestFlagsArray = [ "tests/unit" ];
33
34 pythonImportsCheck = [ "pyowm" ];
35
36 meta = with lib; {
37 description = "Python wrapper around the OpenWeatherMap web API";
38 homepage = "https://pyowm.readthedocs.io/";
39 license = licenses.mit;
40 maintainers = with maintainers; [ fab ];
41 };
42}