summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pysunspec2/default.nix
blob: dc9e1ae244193476c2243d6e990974b0b868b106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  pytestCheckHook,
  setuptools,
  pyserial,
  openpyxl,
}:

buildPythonPackage rec {
  pname = "pysunspec2";
  version = "1.3.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "sunspec";
    repo = "pysunspec2";
    tag = "v${version}";
    hash = "sha256-mVx8Rt5GLyQ2ss0iJPi32Fhl9pD7hsXxW94p+8ri+w4=";
    fetchSubmodules = true;
  };

  build-system = [ setuptools ];

  dependencies = [
    openpyxl
    pyserial
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pytestFlags = [
    # This test relies on old pymodbus 2 version
    "--ignore=sunspec2/tests/test_tls_client.py"
  ];

  pythonImportsCheck = [ "sunspec2" ];

  meta = {
    description = "Python library for interfacing with SunSpec devices";
    homepage = "https://github.com/sunspec/pysunspec2";
    changelog = "https://github.com/sunspec/pysunspec2/releases/tag/${src.tag}";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.cheriimoya ];
  };
}