2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, blessed
|
|
|
|
, keyring
|
|
|
|
, keyrings-alt
|
|
|
|
, lxml
|
|
|
|
, measurement
|
|
|
|
, python-dateutil
|
|
|
|
, requests
|
|
|
|
, rich
|
2022-04-27 09:35:20 +00:00
|
|
|
, typing-extensions
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, mock
|
|
|
|
, nose
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2020-10-27 00:29:36 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "myfitnesspal";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.17.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-UXFvKQtC44EvscYWXK7KI/do3U0wTWI3zKwvsRdzKrs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
blessed
|
|
|
|
keyring
|
|
|
|
keyrings-alt
|
|
|
|
lxml
|
|
|
|
measurement
|
|
|
|
python-dateutil
|
|
|
|
requests
|
|
|
|
rich
|
2022-04-27 09:35:20 +00:00
|
|
|
typing-extensions
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
nose
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
# Remove overly restrictive version constraints
|
|
|
|
sed -i -e "s/>=.*//" requirements.txt
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Integration tests require an account to be set
|
|
|
|
"test_integration"
|
|
|
|
];
|
2020-10-27 00:29:36 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"myfitnesspal"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "Python module to access meal tracking data stored in MyFitnessPal";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/coddingtonbear/python-myfitnesspal";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bhipple ];
|
|
|
|
};
|
|
|
|
}
|