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