nixpkgs/pkgs/development/python-modules/pywick/default.nix
Martin Weinelt afe8ee8b47
python3Packages.torch{,-bin}: rename from pytorch{,-bin}
The proper name for a python package is the one in the setuptools
setup() call, which can also be seen on pypi.

Correct: https://pypi.org/project/torch/
Wrong: https://pypi.org/project/pytorch/

Includes a treewide rename of the attribute and creates aliases for the
old name.
2022-08-30 17:46:57 +02:00

49 lines
849 B
Nix

{ buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytest
, h5py
, hickle
, numpy
, pandas
, pillow
, six
, torch
, torchvision
, tqdm
, lib
}:
buildPythonPackage rec {
pname = "pywick";
version = "0.6.5";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "achaiah";
repo = pname;
rev = "v${version}";
sha256 = "0wnijdvqgdpzfdsy1cga3bsr0n7zzsl8hp4dskqwxx087g5h1r84";
};
propagatedBuildInputs = [
h5py hickle numpy pandas pillow six torch torchvision tqdm
];
checkInputs = [ pytest ];
checkPhase = ''
runHook preCheck
pytest tests/
runHook postCheck
'';
meta = {
description = "High-level training framework for Pytorch";
homepage = "https://github.com/achaiah/pywick";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ bcdarwin ];
};
}