Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.myfitnesspal: fix build #101760

Merged
merged 1 commit into from
Oct 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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