2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
wheel,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bacpypes";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.18.6";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# uses the removed asyncore module
|
|
|
|
disabled = pythonOlder "3.9" || pythonAtLeast "3.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JoelBender";
|
|
|
|
repo = "bacpypes";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-BHCHI36nTqBj2dkHB/Y5qkC4uJCmzbHGzSFWKNsIdbc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'," "" \
|
|
|
|
--replace "(3, 8): 'py34'," "(3, 8): 'py34', (3, 9): 'py34', (3, 10): 'py34', (3, 11): 'py34', (3, 12): 'py34',"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ wheel ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test fails with a an error: AssertionError: assert 30 == 31
|
|
|
|
"test_recurring_task_5"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "bacpypes" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-07-15 17:15:38 +00:00
|
|
|
description = "Module for the BACnet application layer and network layer";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/JoelBender/bacpypes";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/JoelBender/bacpypes/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bachp ];
|
|
|
|
};
|
|
|
|
}
|