1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 unasync,
8 boto3,
9 botocore,
10 requests,
11 aiohttp,
12 pyquery,
13 loguru,
14}:
15
16buildPythonPackage rec {
17 pname = "pyhiveapi";
18 version = "0.5.16";
19 pyproject = true;
20
21 disabled = pythonOlder "3.6";
22
23 src = fetchFromGitHub {
24 owner = "Pyhass";
25 repo = "Pyhiveapi";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-gPou5KGLFEFP29qSpRg+6sCiXOwfoF1gyhBVERYJ1LI=";
28 };
29
30 postPatch = ''
31 substituteInPlace requirements.txt \
32 --replace "pre-commit" ""
33 '';
34
35 nativeBuildInputs = [
36 setuptools
37 unasync
38 ];
39
40 propagatedBuildInputs = [
41 boto3
42 botocore
43 requests
44 aiohttp
45 pyquery
46 loguru
47 ];
48
49 # tests are not functional yet
50 doCheck = false;
51
52 postBuild = ''
53 # pyhiveapi accesses $HOME upon importing
54 export HOME=$TMPDIR
55 '';
56
57 pythonImportsCheck = [ "pyhiveapi" ];
58
59 meta = with lib; {
60 description = "Python library to interface with the Hive API";
61 homepage = "https://github.com/Pyhass/Pyhiveapi";
62 changelog = "https://github.com/Pyhass/Pyhiveapi/releases/tag/v${version}";
63 license = licenses.mit;
64 maintainers = with maintainers; [ dotlambda ];
65 };
66}