1{
2 lib,
3 asn1crypto,
4 attrs,
5 buildPythonPackage,
6 cryptography,
7 fetchFromGitHub,
8 pyserial,
9 pytestCheckHook,
10 python-dateutil,
11 pythonOlder,
12 setuptools,
13 structlog,
14 typing-extensions,
15}:
16
17buildPythonPackage rec {
18 pname = "dlms-cosem";
19 version = "25.1.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "pwitab";
26 repo = "dlms-cosem";
27 tag = version;
28 hash = "sha256-ZsF+GUVG9bZNZE5daROQJIZZgqpjAkB/bFyre2oGu+E=";
29 };
30
31 build-system = [ setuptools ];
32
33 dependencies = [
34 asn1crypto
35 attrs
36 cryptography
37 pyserial
38 python-dateutil
39 structlog
40 typing-extensions
41 ];
42
43 nativeCheckInputs = [ pytestCheckHook ];
44
45 pythonImportsCheck = [ "dlms_cosem" ];
46
47 meta = with lib; {
48 description = "Python module to parse DLMS/COSEM";
49 homepage = "https://github.com/pwitab/dlms-cosem";
50 changelog = "https://github.com/pwitab/dlms-cosem/blob/${src.tag}/HISTORY.md";
51 license = licenses.mit;
52 maintainers = with maintainers; [ fab ];
53 };
54}