1{
2 lib,
3 aiohttp,
4 async-timeout,
5 bitstring,
6 buildPythonPackage,
7 fetchFromGitHub,
8 poetry-core,
9 pyserial-asyncio,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "pysml";
15 version = "0.1.2";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "mtdcr";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 hash = "sha256-TLIpc0bVx1As2oLyYD+BBMalwJiKdvBCcrd1tUNyh6Y=";
25 };
26
27 nativeBuildInputs = [ poetry-core ];
28
29 propagatedBuildInputs = [
30 aiohttp
31 async-timeout
32 bitstring
33 pyserial-asyncio
34 ];
35
36 # Project has no tests
37 doCheck = false;
38
39 pythonImportsCheck = [ "sml" ];
40
41 meta = with lib; {
42 description = "Python library for EDL21 smart meters using Smart Message Language (SML)";
43 homepage = "https://github.com/mtdcr/pysml";
44 license = with licenses; [ mit ];
45 maintainers = with maintainers; [ fab ];
46 };
47}