1a04744f74
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
61 lines
1.2 KiB
Nix
61 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
hatchling,
|
|
jupyter,
|
|
nbconvert,
|
|
numpy,
|
|
parameterized,
|
|
pillow,
|
|
pytestCheckHook,
|
|
writableTmpDirAsHomeHook,
|
|
torch,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "einops";
|
|
version = "0.8.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "arogozhnikov";
|
|
repo = "einops";
|
|
tag = "v${version}";
|
|
hash = "sha256-J9m5LMOleHf2UziUbOtwf+DFpu/wBDcAyHUor4kqrR8=";
|
|
};
|
|
|
|
build-system = [ hatchling ];
|
|
|
|
nativeCheckInputs = [
|
|
writableTmpDirAsHomeHook
|
|
jupyter
|
|
nbconvert
|
|
numpy
|
|
parameterized
|
|
pillow
|
|
pytestCheckHook
|
|
torch
|
|
];
|
|
|
|
env.EINOPS_TEST_BACKENDS = "numpy";
|
|
|
|
pythonImportsCheck = [ "einops" ];
|
|
|
|
disabledTestPaths = [
|
|
# skip folder with notebook samples that depend on large packages
|
|
# or accelerator access and have been unreliable
|
|
"scripts/"
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = {
|
|
changelog = "https://github.com/arogozhnikov/einops/releases/tag/${src.tag}";
|
|
description = "Flexible and powerful tensor operations for readable and reliable code";
|
|
homepage = "https://github.com/arogozhnikov/einops";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ yl3dy ];
|
|
};
|
|
}
|