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