python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / myfitnesspal / default.nix
blob5572ff0d69b0061f5ad3b268223f0eb39d9c237e
2   lib,
3   blessed,
4   browser-cookie3,
5   buildPythonPackage,
6   cloudscraper,
7   fetchPypi,
8   keyring,
9   keyrings-alt,
10   lxml,
11   measurement,
12   mock,
13   pytestCheckHook,
14   python-dateutil,
15   pythonOlder,
16   requests,
17   rich,
18   setuptools,
19   typing-extensions,
22 buildPythonPackage rec {
23   pname = "myfitnesspal";
24   version = "2.1.0";
25   pyproject = true;
27   disabled = pythonOlder "3.7";
29   src = fetchPypi {
30     inherit pname version;
31     hash = "sha256-H9oKSio+2x4TDCB4YN5mmERUEeETLKahPlW3TDDFE/E=";
32   };
34   nativeBuildInputs = [ setuptools ];
36   propagatedBuildInputs = [
37     blessed
38     browser-cookie3
39     cloudscraper
40     keyring
41     keyrings-alt
42     lxml
43     measurement
44     python-dateutil
45     requests
46     rich
47     typing-extensions
48   ];
50   nativeCheckInputs = [
51     mock
52     pytestCheckHook
53   ];
55   postPatch = ''
56     # Remove overly restrictive version constraints
57     sed -i -e "s/>=.*//" requirements.txt
59     # https://github.com/coddingtonbear/python-measurement/pull/8
60     substituteInPlace tests/test_client.py \
61       --replace-fail "Weight" "Mass" \
62       --replace-fail '"Mass"' '"Weight"'
63   '';
65   disabledTests = [
66     # Integration tests require an account to be set
67     "test_integration"
68   ];
70   pythonImportsCheck = [ "myfitnesspal" ];
72   meta = {
73     description = "Python module to access meal tracking data stored in MyFitnessPal";
74     mainProgram = "myfitnesspal";
75     homepage = "https://github.com/coddingtonbear/python-myfitnesspal";
76     license = lib.licenses.mit;
77     maintainers = with lib.maintainers; [ bhipple ];
78   };