1{ lib
2, beautifulsoup4
3, buildPythonPackage
4, fetchFromGitHub
5, html5lib
6, pytestCheckHook
7, pythonOlder
8, requests
9, requests-mock
10, urllib3
11}:
12
13buildPythonPackage rec {
14 pname = "raincloudy";
15 version = "1.2.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "vanstinator";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 hash = "sha256-qCkBVirM09iA1sXiOB9FJns8bHjQq7rRk8XbRWrtBDI=";
25 };
26
27 propagatedBuildInputs = [
28 requests
29 beautifulsoup4
30 urllib3
31 html5lib
32 ];
33
34 checkInputs = [
35 pytestCheckHook
36 requests-mock
37 ];
38
39 postPatch = ''
40 # https://github.com/vanstinator/raincloudy/pull/60
41 substituteInPlace setup.py \
42 --replace "bs4" "beautifulsoup4" \
43 --replace "html5lib==1.0.1" "html5lib"
44 '';
45
46 pythonImportsCheck = [
47 "raincloudy"
48 ];
49
50 disabledTests = [
51 # Test requires network access
52 "test_attributes"
53 ];
54
55 meta = with lib; {
56 description = "Module to interact with Melnor RainCloud Smart Garden Watering Irrigation Timer";
57 homepage = "https://github.com/vanstinator/raincloudy";
58 license = with licenses; [ asl20 ];
59 maintainers = with maintainers; [ fab ];
60 };
61}