mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-19 07:01:12 +00:00
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
78 lines
1.5 KiB
Nix
78 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
blessed,
|
|
browser-cookie3,
|
|
buildPythonPackage,
|
|
cloudscraper,
|
|
fetchPypi,
|
|
keyring,
|
|
keyrings-alt,
|
|
lxml,
|
|
measurement,
|
|
mock,
|
|
pytestCheckHook,
|
|
python-dateutil,
|
|
requests,
|
|
rich,
|
|
setuptools,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "myfitnesspal";
|
|
version = "2.1.2";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-eE807M8qFDlSMAcE+GFJyve1YfmlWmB3ML9VJhMUeIE=";
|
|
};
|
|
|
|
pythonRelaxDeps = [ "typing-extensions" ];
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
propagatedBuildInputs = [
|
|
blessed
|
|
browser-cookie3
|
|
cloudscraper
|
|
keyring
|
|
keyrings-alt
|
|
lxml
|
|
measurement
|
|
python-dateutil
|
|
requests
|
|
rich
|
|
typing-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
mock
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
# Remove overly restrictive version constraints
|
|
sed -i -e "s/>=.*//" requirements.txt
|
|
|
|
# https://github.com/coddingtonbear/python-measurement/pull/8
|
|
substituteInPlace tests/test_client.py \
|
|
--replace-fail "Weight" "Mass" \
|
|
--replace-fail '"Mass"' '"Weight"'
|
|
'';
|
|
|
|
disabledTests = [
|
|
# Integration tests require an account to be set
|
|
"test_integration"
|
|
];
|
|
|
|
pythonImportsCheck = [ "myfitnesspal" ];
|
|
|
|
meta = {
|
|
description = "Python module to access meal tracking data stored in MyFitnessPal";
|
|
mainProgram = "myfitnesspal";
|
|
homepage = "https://github.com/coddingtonbear/python-myfitnesspal";
|
|
license = lib.licenses.mit;
|
|
};
|
|
}
|