1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytest-asyncio,
7 pytest-cov-stub,
8 pytestCheckHook,
9 pythonOlder,
10 requests-mock,
11 requests,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "swisshydrodata";
17 version = "0.3.1";
18 pyproject = true;
19
20 disabled = pythonOlder "3.12";
21
22 src = fetchFromGitHub {
23 owner = "Bouni";
24 repo = "swisshydrodata";
25 tag = version;
26 hash = "sha256-Yy/sc/SKKftIsZLyIJabrgcgYwbBxZMXbhTaWSIKpM8=";
27 };
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 requests
33 aiohttp
34 ];
35
36 nativeCheckInputs = [
37 pytest-asyncio
38 pytest-cov-stub
39 pytestCheckHook
40 requests-mock
41 ];
42
43 pythonImportsCheck = [ "swisshydrodata" ];
44
45 meta = with lib; {
46 description = "Python client to get data from the Swiss federal Office for Environment FEON";
47 homepage = "https://github.com/bouni/swisshydrodata";
48 changelog = "https://github.com/Bouni/swisshydrodata/releases/tag/${src.tag}";
49 license = licenses.mit;
50 maintainers = with maintainers; [ fab ];
51 };
52}