1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 requests,
8 requests-mock,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "losant-rest";
14 version = "1.22.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "Losant";
21 repo = "losant-rest-python";
22 tag = "v${version}";
23 hash = "sha256-7H7jmNsz5UTcM0i1KiVwQb2UMlLRQ/3W2rhM79+Q4Es=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [ requests ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 requests-mock
33 ];
34
35 enabledTestPaths = [ "tests/platformrest_tests.py" ];
36
37 pythonImportsCheck = [ "platformrest" ];
38
39 meta = with lib; {
40 description = "Python module for consuming the Losant IoT Platform API";
41 homepage = "https://github.com/Losant/losant-rest-python";
42 license = licenses.mit;
43 maintainers = with maintainers; [ fab ];
44 };
45}