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