Merge pull request #101760 from IvarWithoutBones/unbreak-myfitnesspal

pythonPackages.myfitnesspal: fix build
This commit is contained in:
Martin Weinelt 2020-10-26 16:58:11 +01:00 committed by GitHub
commit 377d00d24a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,9 @@
{ lib, fetchPypi, buildPythonPackage
, blessed, keyring, keyrings-alt, lxml, measurement, python-dateutil, requests, six
, mock, nose }:
, 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";
@ -11,14 +14,18 @@ buildPythonPackage rec {
sha256 = "c2275e91c794a3569a76c47c78cf2ff04d7f569a98558227e899ead7b30af0d6";
};
# Remove overly restrictive version constraints on keyring and keyrings.alt
# Remove overly restrictive version constraints
postPatch = ''
sed -i 's/keyring>=.*/keyring/' requirements.txt
sed -i 's/keyrings.alt>=.*/keyrings.alt/' requirements.txt
sed -i 's/rich>=.*/rich/' requirements.txt
'';
checkInputs = [ mock nose ];
propagatedBuildInputs = [ blessed keyring keyrings-alt lxml measurement python-dateutil requests six ];
propagatedBuildInputs = [ blessed keyring keyrings-alt lxml measurement python-dateutil requests six rich ];
# Integration tests require an account to be set
disabledTests = [ "test_integration" ];
checkInputs = [ pytestCheckHook mock nose ];
meta = with lib; {
description = "Access your meal tracking data stored in MyFitnessPal programatically";