1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 regex,
7 requests,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "pysuez";
13 version = "0.2.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "ooii";
20 repo = "pySuez";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-Xgd0E/oFO2yyytBjuwr1vDJfKWC0Iw8P6GStCuCni/g=";
23 };
24
25 postPatch = ''
26 substituteInPlace setup.py \
27 --replace ", 'datetime'" ""
28 '';
29
30 nativeBuildInputs = [ setuptools ];
31
32 propagatedBuildInputs = [
33 regex
34 requests
35 ];
36
37 # Module has no tests
38 doCheck = false;
39
40 pythonImportsCheck = [ "pysuez" ];
41
42 meta = with lib; {
43 description = "Module to get water consumption data from Suez";
44 mainProgram = "pysuez";
45 homepage = "https://github.com/ooii/pySuez";
46 changelog = "https://github.com/ooii/pySuez/releases/tag/v${version}";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ fab ];
49 };
50}