mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-04 19:24:20 +00:00
python3Packages.fitbit: clean-up and rename requests-oauthlib
This commit is contained in:
parent
bb7af999e8
commit
f31dd24fac
@ -1,41 +1,49 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, coverage
|
||||
, python-dateutil
|
||||
, freezegun
|
||||
, mock
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
, pythonOlder
|
||||
, requests-mock
|
||||
, requests_oauthlib
|
||||
, sphinx
|
||||
, requests-oauthlib
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fitbit";
|
||||
version = "0.3.1";
|
||||
format = "setuptools";
|
||||
|
||||
checkInputs = [ coverage freezegun mock requests-mock sphinx ];
|
||||
propagatedBuildInputs = [ python-dateutil requests_oauthlib ];
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
# The source package on PyPi is missing files required for unit testing.
|
||||
# https://github.com/orcasgit/python-fitbit/issues/148
|
||||
src = fetchFromGitHub {
|
||||
rev = version;
|
||||
owner = "orcasgit";
|
||||
repo = "python-fitbit";
|
||||
sha256 = "1w2lpgf6bs5nbnmslppaf4lbhr9cj6grg0a525xv41jip7iy3vfn";
|
||||
rev = version;
|
||||
hash = "sha256-1u3h47lRBrJ7EUWBl5+RLGW4KHHqXqqrXbboZdy7VPA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements/test.txt \
|
||||
--replace 'Sphinx>=1.2,<1.4' 'Sphinx' \
|
||||
--replace 'coverage>=3.7,<4.0' 'coverage'
|
||||
'';
|
||||
propagatedBuildInputs = [
|
||||
python-dateutil
|
||||
requests-oauthlib
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
freezegun
|
||||
mock
|
||||
pytestCheckHook
|
||||
requests-mock
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"fitbit"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fitbit API Python Client Implementation";
|
||||
license = licenses.asl20;
|
||||
homepage = "https://github.com/orcasgit/python-fitbit";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ delroth ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user