1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7
8 # propagated
9 aiohttp,
10
11 # tests
12 pytest-asyncio,
13 pytestCheckHook,
14}:
15
16let
17 pname = "pyoctoprintapi";
18 version = "0.1.14";
19in
20buildPythonPackage {
21 inherit pname version;
22 pyproject = true;
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchFromGitHub {
27 owner = "rfleming71";
28 repo = "pyoctoprintapi";
29 tag = "v${version}";
30 hash = "sha256-DKqkT0Wyxf4grXBqei9IYBGMOgPxjzuo955M/nHDLo8=";
31 };
32
33 nativeBuildInputs = [ setuptools ];
34
35 propagatedBuildInputs = [ aiohttp ];
36
37 pythonImportsCheck = [ "pyoctoprintapi" ];
38
39 nativeCheckInputs = [
40 pytest-asyncio
41 pytestCheckHook
42 ];
43
44 meta = with lib; {
45 description = "Simple async wrapper around the Octoprint API";
46 homepage = "https://github.com/rfleming71/pyoctoprintapi";
47 changelog = "https://github.com/rfleming71/pyoctoprintapi/releases/tag/v${version}";
48 license = licenses.mit;
49 maintainers = with maintainers; [ hexa ];
50 };
51}