1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, wheel
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "bacpypes";
11 version = "0.18.6";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.9";
15
16 src = fetchFromGitHub {
17 owner = "JoelBender";
18 repo = "bacpypes";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-BHCHI36nTqBj2dkHB/Y5qkC4uJCmzbHGzSFWKNsIdbc=";
21 };
22
23 postPatch = ''
24 substituteInPlace setup.py \
25 --replace "'pytest-runner'," "" \
26 --replace "(3, 8): 'py34'," "(3, 8): 'py34', (3, 9): 'py34', (3, 10): 'py34', (3, 11): 'py34', (3, 12): 'py34',"
27 '';
28
29 propagatedBuildInputs = [
30 wheel
31 ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 ];
36
37 disabledTests = [
38 # Test fails with a an error: AssertionError: assert 30 == 31
39 "test_recurring_task_5"
40 ];
41
42 pythonImportsCheck = [
43 "bacpypes"
44 ];
45
46 meta = with lib; {
47 description = "Module for the BACnet application layer and network layer";
48 homepage = "https://github.com/JoelBender/bacpypes";
49 changelog = "https://github.com/JoelBender/bacpypes/releases/tag/v${version}";
50 license = licenses.mit;
51 maintainers = with maintainers; [ bachp ];
52 };
53}