1{
2 lib,
3 buildPythonPackage,
4 fetchpatch,
5 fetchPypi,
6 attrs,
7 requests,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "pyqwikswitch";
13 version = "0.94";
14 pyproject = true;
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-IpyWz+3EMr0I+xULBJJhBgdnQHNPJIM1SqKFLpszhQc=";
19 };
20
21 patches = [
22 # https://github.com/kellerza/pyqwikswitch/pull/7
23 (fetchpatch {
24 name = "replace-async-timeout-with-asyncio.timeout.patch";
25 url = "https://github.com/kellerza/pyqwikswitch/commit/7b3f2211962b30bb6beea9a4fe17cd04cdf8e27f.patch";
26 hash = "sha256-sdO5jzIgKdneNY5dTngIzUFtyRg7HBGaZA1BBeAJxu4=";
27 })
28 ];
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 attrs
34 requests
35 ];
36
37 pythonImportsCheck = [
38 "pyqwikswitch"
39 "pyqwikswitch.threaded"
40 ];
41
42 doCheck = false; # no tests in sdist
43
44 meta = with lib; {
45 description = "QwikSwitch USB Modem API binding for Python";
46 homepage = "https://github.com/kellerza/pyqwikswitch";
47 license = licenses.mit;
48 teams = [ teams.home-assistant ];
49 };
50}