1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 requests,
7 requests-oauthlib,
8 voluptuous,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "pybotvac";
14 version = "0.0.25";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-EvGBStEYgqFO9GMtxs1qtDixb4y2Ptom8xncRUv4ur4=";
22 };
23
24 postPatch = ''
25 substituteInPlace pybotvac/robot.py \
26 --replace-fail "import urllib3" "" \
27 --replace-fail "urllib3.disable_warnings(urllib3.exceptions.SubjectAltNameWarning)" "# urllib3.disable_warnings(urllib3.exceptions.SubjectAltNameWarning)"
28 '';
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 requests
34 requests-oauthlib
35 voluptuous
36 ];
37
38 # Module no tests
39 doCheck = false;
40
41 pythonImportsCheck = [ "pybotvac" ];
42
43 meta = with lib; {
44 description = "Python module for interacting with Neato Botvac Connected vacuum robots";
45 homepage = "https://github.com/stianaske/pybotvac";
46 changelog = "https://github.com/stianaske/pybotvac/releases/tag/v${version}";
47 license = licenses.mit;
48 maintainers = with maintainers; [ fab ];
49 };
50}