Merge pull request #41628 from jyp/tensorflow-deps-fix
pythonPackages.Tensorflow: fix dependencies
This commit is contained in:
commit
d358525280
5 changed files with 50 additions and 9 deletions
17
pkgs/development/python-modules/astunparse/default.nix
Normal file
17
pkgs/development/python-modules/astunparse/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ stdenv, fetchPypi, buildPythonPackage, six }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "astunparse";
|
||||
version = "1.5.0";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1kc9lm2jvfcip3z8snj04dar5a9jh857a704m6lvcv4xclm3rpsm";
|
||||
};
|
||||
propagatedBuildInputs = [ six ];
|
||||
doCheck = false; # no tests
|
||||
meta = with stdenv.lib; {
|
||||
description = "This is a factored out version of unparse found in the Python source distribution";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ jyp ];
|
||||
};
|
||||
}
|
16
pkgs/development/python-modules/gast/default.nix
Normal file
16
pkgs/development/python-modules/gast/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ stdenv, fetchPypi, buildPythonPackage, astunparse }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gast";
|
||||
version = "0.2.0";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h";
|
||||
};
|
||||
checkInputs = [ astunparse ] ;
|
||||
meta = with stdenv.lib; {
|
||||
description = "GAST provides a compatibility layer between the AST of various Python versions, as produced by ast.parse from the standard ast module.";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ jyp ];
|
||||
};
|
||||
}
|
|
@ -3,33 +3,34 @@
|
|||
, numpy
|
||||
, werkzeug
|
||||
, protobuf
|
||||
, grpcio
|
||||
, markdown
|
||||
, futures
|
||||
}:
|
||||
|
||||
# tensorflow is built from a downloaded wheel, because
|
||||
# https://github.com/tensorflow/tensorboard/issues/719
|
||||
# blocks buildBazelPackage.
|
||||
# tensorflow/tensorboard is built from a downloaded wheel, because
|
||||
# https://github.com/tensorflow/tensorboard/issues/719 blocks
|
||||
# buildBazelPackage.
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "tensorflow-tensorboard";
|
||||
version = "1.5.1";
|
||||
version = "1.7.0";
|
||||
name = "${pname}-${version}";
|
||||
format = "wheel";
|
||||
|
||||
src = fetchPypi ({
|
||||
pname = "tensorflow_tensorboard";
|
||||
pname = "tensorboard";
|
||||
inherit version;
|
||||
format = "wheel";
|
||||
} // (if isPy3k then {
|
||||
python = "py3";
|
||||
sha256 = "1cydgvrr0s05xqz1v9z2wdiv60gzbs8wv9wvbflw5700a2llb63l";
|
||||
sha256 = "1aa42rl3fkpllqch09d311gk1j281qry6nn07ywgbs6j0kwr6isc";
|
||||
} else {
|
||||
python = "py2";
|
||||
sha256 = "0dhljddlirq6nr84zg4yrk5k69gj3x2abb6wg3crgrparb6qbya7";
|
||||
sha256 = "1vcdkyvw22kpljmj4gxb8m1q54ry02iwvw54w8v8hmdigvc77a7k";
|
||||
}));
|
||||
|
||||
propagatedBuildInputs = [ bleach_1_5_0 numpy werkzeug protobuf markdown ] ++ lib.optional (!isPy3k) futures;
|
||||
propagatedBuildInputs = [ bleach_1_5_0 numpy werkzeug protobuf markdown grpcio ] ++ lib.optional (!isPy3k) futures;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "TensorFlow's Visualization Toolkit";
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
, fetchurl
|
||||
, buildPythonPackage
|
||||
, isPy3k, isPy35, isPy36, pythonOlder
|
||||
, astor
|
||||
, gast
|
||||
, numpy
|
||||
, six
|
||||
, termcolor
|
||||
, protobuf
|
||||
, absl-py
|
||||
, mock
|
||||
|
@ -47,7 +50,7 @@ in buildPythonPackage rec {
|
|||
dls = import ./tf1.7.1-hashes.nix;
|
||||
in fetchurl dls.${key};
|
||||
|
||||
propagatedBuildInputs = [ numpy six protobuf absl-py ]
|
||||
propagatedBuildInputs = [ numpy six protobuf absl-py astor gast termcolor ]
|
||||
++ lib.optional (!isPy3k) mock
|
||||
++ lib.optionals (pythonOlder "3.4") [ backports_weakref enum34 ]
|
||||
++ lib.optional (pythonOlder "3.6") tensorflow-tensorboard;
|
||||
|
|
|
@ -18177,6 +18177,10 @@ EOF
|
|||
|
||||
spectral-cube = callPackage ../development/python-modules/spectral-cube { };
|
||||
|
||||
astunparse = callPackage ../development/python-modules/astunparse { };
|
||||
|
||||
gast = callPackage ../development/python-modules/gast { };
|
||||
|
||||
});
|
||||
|
||||
in fix' (extends overrides packages)
|
||||
|
|
Loading…
Reference in a new issue