Skip to content

Commit

Permalink
Merge pull request #101760 from IvarWithoutBones/unbreak-myfitnesspal
Browse files Browse the repository at this point in the history
pythonPackages.myfitnesspal: fix build
  • Loading branch information
mweinelt committed Oct 26, 2020
2 parents b2c82f5 + 7cea883 commit 377d00d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkgs/development/python-modules/myfitnesspal/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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";
Expand Down

0 comments on commit 377d00d

Please sign in to comment.