1{ lib
2, aiodns
3, aiohttp
4, async-timeout
5, attrs
6, brotlipy
7, buildPythonPackage
8, faust-cchardet
9, click
10, colorama
11, fetchFromGitHub
12, halo
13, poetry-core
14, pythonOlder
15, requests
16, rich
17}:
18
19buildPythonPackage rec {
20 pname = "surepy";
21 version = "0.8.0";
22 format = "pyproject";
23
24 disabled = pythonOlder "3.8";
25
26 src = fetchFromGitHub {
27 owner = "benleb";
28 repo = pname;
29 rev = "refs/tags/v${version}";
30 hash = "sha256-/fgNznsucjHPO44lK4tk5tDJHKjCJEbPtOO7YHmDcRQ=";
31 };
32
33 postPatch = ''
34 substituteInPlace pyproject.toml \
35 --replace 'aiohttp = {extras = ["speedups"], version = "^3.7.4"}' 'aiohttp = {extras = ["speedups"], version = ">=3.7.4"}' \
36 --replace 'async-timeout = "^3.0.1"' 'async-timeout = ">=3.0.1"' \
37 --replace 'rich = "^10.1.0"' 'rich = ">=10.1.0"'
38 '';
39
40 nativeBuildInputs = [
41 poetry-core
42 ];
43
44 propagatedBuildInputs = [
45 aiodns
46 aiohttp
47 async-timeout
48 attrs
49 brotlipy
50 click
51 colorama
52 faust-cchardet
53 halo
54 requests
55 rich
56 ];
57
58 # Project has no tests
59 doCheck = false;
60
61 pythonImportsCheck = [
62 "surepy"
63 ];
64
65 meta = with lib; {
66 description = "Python library to interact with the Sure Petcare API";
67 homepage = "https://github.com/benleb/surepy";
68 license = with licenses; [ mit ];
69 maintainers = with maintainers; [ fab ];
70 };
71}