nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "pycomm3";
11 version = "1.2.16";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "ottowayi";
16 repo = "pycomm3";
17 tag = "v${version}";
18 hash = "sha256-xcN0TKwWg23CDBmwMRZlPFuKYpeLg7KSXzhRtNuP6Ls=";
19 };
20
21 build-system = [ setuptools ];
22
23 nativeCheckInputs = [ pytestCheckHook ];
24
25 pythonImportsCheck = [ "pycomm3" ];
26
27 disabledTestPaths = [
28 # Don't test examples as some have additional requirements
29 "examples/"
30 # No physical PLC available
31 "tests/online/"
32 ];
33
34 meta = {
35 description = "Python Ethernet/IP library for communicating with Allen-Bradley PLCs";
36 homepage = "https://github.com/ottowayi/pycomm3";
37 changelog = "https://github.com/ottowayi/pycomm3/releases/tag/${src.tag}";
38 license = lib.licenses.mit;
39 maintainers = with lib.maintainers; [ fab ];
40 };
41}