torchvision: 0.2.1 -> 0.8.2

This commit is contained in:
Sandro Jäckel 2020-12-30 00:04:35 +01:00
parent 86102ebe5e
commit 77c70abb81
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -1,30 +1,48 @@
{ buildPythonPackage
, fetchPypi
, six
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, ninja
, which
, libjpeg_turbo
, libpng
, numpy
, scipy
, pillow
, pytorch
, lib
, pytestCheckHook
}:
buildPythonPackage rec {
version = "0.2.1";
pname = "torchvision";
version = "0.8.2";
format = "wheel";
src = fetchPypi {
inherit pname version;
format = "wheel";
sha256 = "18gvdabkmzfjg47ns0lw38mf85ry28nq1mas5rzlwvb4l5zmw2ms";
src = fetchFromGitHub {
owner = "pytorch";
repo = "vision";
rev = "v${version}";
sha256 = "0yhpbq7linrk2qp5jxsvlgkmwa5bn38s9kcswy4jzvmx1fjbkpq0";
};
propagatedBuildInputs = [ six numpy pillow pytorch ];
nativeBuildInputs = [ libpng ninja which ];
meta = {
TORCHVISION_INCLUDE="${libjpeg_turbo.dev}/include/";
TORCHVISION_LIBRARY="${libjpeg_turbo}/lib/";
buildInputs = [ libjpeg_turbo libpng ];
propagatedBuildInputs = [ numpy pillow pytorch scipy ];
# checks fail to import _C.so and various other failures
doCheck = false;
checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "--ignore=test/test_datasets_download.py" ];
meta = with stdenv.lib; {
description = "PyTorch vision library";
homepage = "https://pytorch.org/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ ericsagnes ];
license = licenses.bsd3;
maintainers = with maintainers; [ ericsagnes SuperSandro2000 ];
};
}