1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 freezegun,
6 mock,
7 pytestCheckHook,
8 python-dateutil,
9 pythonOlder,
10 requests-mock,
11 requests-oauthlib,
12}:
13
14buildPythonPackage rec {
15 pname = "fitbit";
16 version = "0.3.1";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "orcasgit";
23 repo = "python-fitbit";
24 rev = version;
25 hash = "sha256-1u3h47lRBrJ7EUWBl5+RLGW4KHHqXqqrXbboZdy7VPA=";
26 };
27
28 postPatch = ''
29 substituteInPlace fitbit_tests/test_api.py \
30 --replace-fail assertRaisesRegexp assertRaisesRegex
31 '';
32
33 propagatedBuildInputs = [
34 python-dateutil
35 requests-oauthlib
36 ];
37
38 nativeCheckInputs = [
39 freezegun
40 mock
41 pytestCheckHook
42 requests-mock
43 ];
44
45 pythonImportsCheck = [ "fitbit" ];
46
47 meta = with lib; {
48 description = "Fitbit API Python Client Implementation";
49 homepage = "https://github.com/orcasgit/python-fitbit";
50 license = licenses.asl20;
51 maintainers = [ ];
52 };
53}