From 44b84602c940f4693789501f42f05d007c463031 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Dec 2021 22:01:39 +0100 Subject: python3Packages.myfitnesspal: 1.16.4 -> 1.16.5 --- .../python-modules/myfitnesspal/default.nix | 61 +++++++++++++++++----- 1 file changed, 47 insertions(+), 14 deletions(-) (limited to 'pkgs/development/python-modules/myfitnesspal/default.nix') diff --git a/pkgs/development/python-modules/myfitnesspal/default.nix b/pkgs/development/python-modules/myfitnesspal/default.nix index 35d1c70a23a..923f639feb9 100644 --- a/pkgs/development/python-modules/myfitnesspal/default.nix +++ b/pkgs/development/python-modules/myfitnesspal/default.nix @@ -1,34 +1,67 @@ -{ lib, fetchPypi, buildPythonPackage -, blessed, keyring, keyrings-alt, lxml, measurement, python-dateutil, requests, six, rich -, pytestCheckHook, mock, nose }: +{ lib +, fetchPypi +, buildPythonPackage +, blessed +, keyring +, keyrings-alt +, lxml +, measurement +, python-dateutil +, requests +, six +, rich +, pytestCheckHook +, mock +, nose +}: # TODO: Define this package in "all-packages.nix" using "toPythonApplication". # This currently errors out, complaining about not being able to find "etree" from "lxml" even though "lxml" is defined in "propagatedBuildInputs". buildPythonPackage rec { pname = "myfitnesspal"; - version = "1.16.4"; + version = "1.16.5"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "44b31623fd71fedd891c3f66be3bc1caa6f1caf88076a75236ab74f8807f6ae5"; + sha256 = "sha256-v7lYaZLHxQs3/2uJnj+9y0xCXfPO1C38jLwzF7IMbb0="; }; - # Remove overly restrictive version constraints + propagatedBuildInputs = [ + blessed + keyring + keyrings-alt + lxml + measurement + python-dateutil + requests + six + rich + ]; + + checkInputs = [ + mock + nose + pytestCheckHook + ]; + postPatch = '' - sed -i 's/keyring>=.*/keyring/' requirements.txt - sed -i 's/keyrings.alt>=.*/keyrings.alt/' requirements.txt - sed -i 's/rich>=.*/rich/' requirements.txt + # Remove overly restrictive version constraints + sed -i -e "s/>=.*//" requirements.txt ''; - propagatedBuildInputs = [ blessed keyring keyrings-alt lxml measurement python-dateutil requests six rich ]; + disabledTests = [ + # Integration tests require an account to be set + "test_integration" + ]; - # Integration tests require an account to be set - disabledTests = [ "test_integration" ]; - checkInputs = [ pytestCheckHook mock nose ]; + pythonImportsCheck = [ + "myfitnesspal" + ]; meta = with lib; { - description = "Access your meal tracking data stored in MyFitnessPal programatically"; + description = "Python module to access meal tracking data stored in MyFitnessPal"; homepage = "https://github.com/coddingtonbear/python-myfitnesspal"; license = licenses.mit; maintainers = with maintainers; [ bhipple ]; -- cgit 1.4.1