nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at haskell-updates 77 lines 1.5 kB view raw
1{ 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 requests, 16 rich, 17 setuptools, 18 typing-extensions, 19}: 20 21buildPythonPackage rec { 22 pname = "myfitnesspal"; 23 version = "2.1.2"; 24 pyproject = true; 25 26 src = fetchPypi { 27 inherit pname version; 28 hash = "sha256-eE807M8qFDlSMAcE+GFJyve1YfmlWmB3ML9VJhMUeIE="; 29 }; 30 31 pythonRelaxDeps = [ "typing-extensions" ]; 32 33 nativeBuildInputs = [ setuptools ]; 34 35 propagatedBuildInputs = [ 36 blessed 37 browser-cookie3 38 cloudscraper 39 keyring 40 keyrings-alt 41 lxml 42 measurement 43 python-dateutil 44 requests 45 rich 46 typing-extensions 47 ]; 48 49 nativeCheckInputs = [ 50 mock 51 pytestCheckHook 52 ]; 53 54 postPatch = '' 55 # Remove overly restrictive version constraints 56 sed -i -e "s/>=.*//" requirements.txt 57 58 # https://github.com/coddingtonbear/python-measurement/pull/8 59 substituteInPlace tests/test_client.py \ 60 --replace-fail "Weight" "Mass" \ 61 --replace-fail '"Mass"' '"Weight"' 62 ''; 63 64 disabledTests = [ 65 # Integration tests require an account to be set 66 "test_integration" 67 ]; 68 69 pythonImportsCheck = [ "myfitnesspal" ]; 70 71 meta = { 72 description = "Python module to access meal tracking data stored in MyFitnessPal"; 73 mainProgram = "myfitnesspal"; 74 homepage = "https://github.com/coddingtonbear/python-myfitnesspal"; 75 license = lib.licenses.mit; 76 }; 77}