1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 aiohttp,
8 incremental,
9 packaging,
10 systembridgemodels,
11 pytest-aiohttp,
12 pytest-socket,
13 pytestCheckHook,
14 syrupy,
15}:
16
17buildPythonPackage rec {
18 pname = "systembridgeconnector";
19 version = "4.1.5";
20 pyproject = true;
21
22 disabled = pythonOlder "3.11";
23
24 src = fetchFromGitHub {
25 owner = "timmo001";
26 repo = "system-bridge-connector";
27 tag = version;
28 hash = "sha256-AzAN7reBAI4atEFutgFrdQHFy/Qc90PQxwSaHaftn5Q=";
29 };
30
31 postPatch = ''
32 substituteInPlace requirements_setup.txt \
33 --replace-fail ">=" " #"
34
35 substituteInPlace systembridgeconnector/_version.py \
36 --replace-fail ", dev=0" ""
37 '';
38
39 build-system = [
40 incremental
41 setuptools
42 ];
43
44 pythonRelaxDeps = [ "incremental" ];
45
46 dependencies = [
47 aiohttp
48 incremental
49 packaging
50 systembridgemodels
51 ];
52
53 pythonImportsCheck = [ "systembridgeconnector" ];
54
55 nativeCheckInputs = [
56 pytest-aiohttp
57 pytest-socket
58 pytestCheckHook
59 syrupy
60 ];
61
62 disabledTests = [
63 "test_get_data"
64 "test_wait_for_response_timeout"
65 ];
66
67 pytestFlagsArray = [ "--snapshot-warn-unused" ];
68
69 meta = {
70 changelog = "https://github.com/timmo001/system-bridge-connector/releases/tag/${version}";
71 description = "This is the connector package for the System Bridge project";
72 homepage = "https://github.com/timmo001/system-bridge-connector";
73 license = lib.licenses.asl20;
74 maintainers = with lib.maintainers; [ dotlambda ];
75 };
76}