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.3.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "csparpa";
22 repo = "pyowm";
23 rev = "refs/tags/${version}";
24 hash = "sha256-cSOhm3aDksLBChZzgw1gjUjLQkElR2/xGFMOb9K9RME=";
25 };
26
27 pythonRelaxDeps = [ "geojson" ];
28
29 build-system = [ setuptools ];
30
31
32 dependencies = [
33 geojson
34 pysocks
35 requests
36 setuptools
37 ];
38
39 nativeCheckInputs = [ pytestCheckHook ];
40
41 # Run only tests which don't require network access
42 pytestFlagsArray = [ "tests/unit" ];
43
44 pythonImportsCheck = [ "pyowm" ];
45
46 meta = with lib; {
47 description = "Python wrapper around the OpenWeatherMap web API";
48 homepage = "https://pyowm.readthedocs.io/";
49 changelog = "https://github.com/csparpa/pyowm/releases/tag/${version}";
50 license = licenses.mit;
51 maintainers = with maintainers; [ fab ];
52 };
53}