aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/myfitnesspal/default.nix
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-12-09 18:55:19 +0000
committerMx Kookie <kookie@spacekookie.de>2020-12-09 18:55:19 +0000
commit80d90d9b204f7c17912740f9f414fe5d59f293ba (patch)
tree5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/development/python-modules/myfitnesspal/default.nix
parent3a31a84c7d3e589035ad08499206aac44a81f424 (diff)
parent83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff)
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/myfitnesspal/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/python-modules/myfitnesspal/default.nix17
1 files changed, 12 insertions, 5 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/myfitnesspal/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/myfitnesspal/default.nix
index 53e5f8253449..0638ce5d1ee5 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/python-modules/myfitnesspal/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/myfitnesspal/default.nix
@@ -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";