1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pint
5, poetry-core
6, psychrolib
7, pytest-asyncio
8, pytestCheckHook
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "pyweatherflowudp";
14 version = "1.4.5";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "briis";
21 repo = "pyweatherflowudp";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-aTwGFYTtd07BsWFaFc7ns+8oh2AxTUfRFSu81Zv5OoA=";
24 };
25
26 nativeBuildInputs = [
27 poetry-core
28 ];
29
30 propagatedBuildInputs = [
31 pint
32 psychrolib
33 ];
34
35 nativeCheckInputs = [
36 pytest-asyncio
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [
41 "pyweatherflowudp"
42 ];
43
44 disabledTests = [
45 # Tests require network access
46 "test_flow_control"
47 "test_listen_and_stop"
48 "test_repetitive_listen_and_stop"
49 "test_process_message"
50 "test_listener_connection_errors"
51 "test_invalid_messages"
52 ];
53
54 meta = with lib; {
55 description = "Library to receive UDP Packets from Weatherflow Weatherstations";
56 homepage = "https://github.com/briis/pyweatherflowudp";
57 changelog = "https://github.com/briis/pyweatherflowudp/blob/${version}/CHANGELOG.md";
58 license = licenses.mit;
59 maintainers = with maintainers; [ fab ];
60 };
61}
62