git.iko.soy/typeable/nixpkgs
on master help sign in
torchvision: 0.2.1 -> 0.8.2
commit77c70abb813783ff71af5c362e1c028f2f870d5d authorSandro Jäckel <sandro.jaeckel@gmail.com> dateWed 30 Dec 2020, 00:04 (6 years ago) parent86102eb
1 file changed+35−17
pkgs/development/python-modules/torchvision/default.nix+35−17
pkgs/development/python-modules/torchvision/default.nix+35−17
@@ -1,30 +1,48 @@
1−{ buildPythonPackage
2−, fetchPypi
3−, six
1+{ stdenv
2+, buildPythonPackage
3+, fetchFromGitHub
4+, ninja
5+, which
6+, libjpeg_turbo
7+, libpng
48, numpy
9+, scipy
510, pillow
611, pytorch
7−, lib
12+, pytestCheckHook
813}:
914
1015buildPythonPackage rec {
11− version = "0.2.1";
12− pname = "torchvision";
16+ pname = "torchvision";
17+ version = "0.8.2";
1318
14− format = "wheel";
15−
16− src = fetchPypi {
17− inherit pname version;
18− format = "wheel";
19− sha256 = "18gvdabkmzfjg47ns0lw38mf85ry28nq1mas5rzlwvb4l5zmw2ms";
19+ src = fetchFromGitHub {
20+ owner = "pytorch";
21+ repo = "vision";
22+ rev = "v${version}";
23+ sha256 = "0yhpbq7linrk2qp5jxsvlgkmwa5bn38s9kcswy4jzvmx1fjbkpq0";
2024 };
2125
22− propagatedBuildInputs = [ six numpy pillow pytorch ];
26+ nativeBuildInputs = [ libpng ninja which ];
27+
28+ TORCHVISION_INCLUDE="${libjpeg_turbo.dev}/include/";
29+ TORCHVISION_LIBRARY="${libjpeg_turbo}/lib/";
30+
31+ buildInputs = [ libjpeg_turbo libpng ];
32+
33+ propagatedBuildInputs = [ numpy pillow pytorch scipy ];
34+
35+ # checks fail to import _C.so and various other failures
36+ doCheck = false;
37+
38+ checkInputs = [ pytestCheckHook ];
39+
40+ pytestFlagsArray = [ "--ignore=test/test_datasets_download.py" ];
2341
24− meta = {
42+ meta = with stdenv.lib; {
2543 description = "PyTorch vision library";
26− homepage = "https://pytorch.org/";
27− license = lib.licenses.bsd3;
28− maintainers = with lib.maintainers; [ ericsagnes ];
44+ homepage = "https://pytorch.org/";
45+ license = licenses.bsd3;
46+ maintainers = with maintainers; [ ericsagnes SuperSandro2000 ];
2947 };
3048}