1{
2 lib,
3 buildPythonPackage,
4 fake-useragent,
5 fetchFromGitHub,
6 pytest-aiohttp,
7 pytestCheckHook,
8 pythonOlder,
9 requests,
10 requests-mock,
11 responses,
12 simplejson,
13}:
14
15buildPythonPackage rec {
16 pname = "pykeyatome";
17 version = "2.1.2";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "jugla";
24 repo = "pyKeyAtome";
25 tag = "V${version}";
26 hash = "sha256-zRXUjekawf2/zTSlXqHVB02dDkb6HbU4NN6UBgl2rtg=";
27 };
28
29 propagatedBuildInputs = [
30 fake-useragent
31 requests
32 simplejson
33 ];
34
35 nativeCheckInputs = [
36 pytest-aiohttp
37 pytestCheckHook
38 requests-mock
39 responses
40 ];
41
42 disabledTests = [
43 # Tests require network access
44 "test_consumption"
45 "test_get_live"
46 "test_login"
47 "test_relog_after_session_down"
48 ];
49
50 pythonImportsCheck = [ "pykeyatome" ];
51
52 meta = with lib; {
53 description = "Python module to get data from Atome Key";
54 mainProgram = "pykeyatome";
55 homepage = "https://github.com/jugla/pyKeyAtome";
56 changelog = "https://github.com/jugla/pyKeyAtome/releases/tag/V${version}";
57 license = licenses.mit;
58 maintainers = with maintainers; [ fab ];
59 };
60}