1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, paho-mqtt
5, pytestCheckHook
6, pythonOlder
7, requests
8, setuptools-scm
9}:
10
11buildPythonPackage rec {
12 pname = "adafruit-io";
13 version = "2.7.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "adafruit";
20 repo = "Adafruit_IO_Python";
21 rev = "refs/tags/${version}";
22 hash = "sha256-BIquSrhtRv2NEOn/G6TTfYMrL2OBwwJQYZ455fznwdU=";
23 };
24
25 SETUPTOOLS_SCM_PRETEND_VERSION = version;
26
27 nativeBuildInputs = [
28 setuptools-scm
29 ];
30
31 propagatedBuildInputs = [
32 paho-mqtt
33 requests
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [
41 "Adafruit_IO"
42 ];
43
44 disabledTestPaths = [
45 # Tests requires valid credentials
46 "tests/test_client.py"
47 "tests/test_errors.py"
48 "tests/test_mqtt_client.py"
49 ];
50
51 meta = with lib; {
52 description = "Module for interacting with Adafruit IO";
53 homepage = "https://github.com/adafruit/Adafruit_IO_Python";
54 license = licenses.mit;
55 maintainers = with maintainers; [ fab ];
56 };
57}