1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 geojson,
6 pysocks,
7 pythonOlder,
8 requests,
9 setuptools,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "pyowm";
15 version = "3.5.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "csparpa";
22 repo = "pyowm";
23 tag = version;
24 hash = "sha256-D1Cl3uWoEIUqA0R+bjRL2YgsVKj5inuBAVLJYluADg0=";
25 };
26
27 pythonRelaxDeps = [ "geojson" ];
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 geojson
33 pysocks
34 requests
35 setuptools
36 ];
37
38 nativeCheckInputs = [ pytestCheckHook ];
39
40 # Run only tests which don't require network access
41 enabledTestPaths = [ "tests/unit" ];
42
43 pythonImportsCheck = [ "pyowm" ];
44
45 meta = with lib; {
46 description = "Python wrapper around the OpenWeatherMap web API";
47 homepage = "https://pyowm.readthedocs.io/";
48 changelog = "https://github.com/csparpa/pyowm/releases/tag/${version}";
49 license = licenses.mit;
50 maintainers = with maintainers; [ fab ];
51 };
52}