From d71dbf2f877e26e10ee60caa21f74f05be4df18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 29 Jun 2018 20:16:22 +0200 Subject: [PATCH 1/3] python.pkgs.tensorflow-tensorboard: 1.7.0 -> 1.9.0 --- .../python-modules/tensorflow-tensorboard/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix b/pkgs/development/python-modules/tensorflow-tensorboard/default.nix index 0d8085395736..5cd0e9266022 100644 --- a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix +++ b/pkgs/development/python-modules/tensorflow-tensorboard/default.nix @@ -1,5 +1,4 @@ { stdenv, lib, fetchPypi, buildPythonPackage, isPy3k -, bleach_1_5_0 , numpy , werkzeug , protobuf @@ -14,7 +13,7 @@ buildPythonPackage rec { pname = "tensorflow-tensorboard"; - version = "1.7.0"; + version = "1.9.0"; format = "wheel"; src = fetchPypi ({ @@ -23,13 +22,13 @@ buildPythonPackage rec { format = "wheel"; } // (if isPy3k then { python = "py3"; - sha256 = "1aa42rl3fkpllqch09d311gk1j281qry6nn07ywgbs6j0kwr6isc"; + sha256 = "42a04637a636e16054b065907c81396b83a9702948ecd14218f19dc5cf85de98"; } else { python = "py2"; - sha256 = "1vcdkyvw22kpljmj4gxb8m1q54ry02iwvw54w8v8hmdigvc77a7k"; + sha256 = "97661706fbe857c372405e0f5bd7c3db2197b5e70cec88f6924b726fde65c2c1"; })); - propagatedBuildInputs = [ bleach_1_5_0 numpy werkzeug protobuf markdown grpcio ] ++ lib.optional (!isPy3k) futures; + propagatedBuildInputs = [ numpy werkzeug protobuf markdown grpcio ] ++ lib.optional (!isPy3k) futures; meta = with stdenv.lib; { description = "TensorFlow's Visualization Toolkit"; From 173a3d27e6413302d127da8e63765aa2eec07b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 29 Jun 2018 20:17:09 +0200 Subject: [PATCH 2/3] python.pkgs.bleach_1_5_0: remove python.pkgs.html5lib_0_9999999 can now be removed as well --- pkgs/top-level/python-packages.nix | 35 ------------------------------ 1 file changed, 35 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eb58f67c5970..82e7f4be192a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1204,47 +1204,12 @@ in { blaze = callPackage ../development/python-modules/blaze { }; - # Needed for bleach 1.5.0 - html5lib_0_9999999 = self.html5lib.overridePythonAttrs rec { - name = "html5lib-${version}"; - disabled = isPy3k && pythonAtLeast "3.6"; - buildInputs = with self; [ nose flake8 ]; - propagatedBuildInputs = with self; [ six ]; - checkPhase = '' - nosetests - ''; - - version = "0.9999999"; - src = pkgs.fetchurl { - url = "https://github.com/html5lib/html5lib-python/archive/0.9999999.tar.gz"; - sha256 = "1s6wdbrjzw5jhyfbskf4nj1i5bjpjqq9f89a7r1rl59rhpwmfhhq"; - }; - }; - html5-parser = callPackage ../development/python-modules/html5-parser {}; httpserver = callPackage ../development/python-modules/httpserver {}; bleach = callPackage ../development/python-modules/bleach { }; - # needed for tensorflow-tensorboard - bleach_1_5_0 = self.bleach.overridePythonAttrs rec { - version = "1.5.0"; - pname = "bleach"; - name = "${pname}-${version}"; - - propagatedBuildInputs = with self; [ six html5lib_0_9999999 ]; - - preCheck = '' - sed -i 's,pytest==[0-9.]*,pytest,' setup.py - ''; - - src = fetchPypi { - inherit pname version; - sha256 = "0rdwb3piwwl30wfqg4ywm07276w7090xfq71lb5d6k5mk62pb3lp"; - }; - }; - blinker = callPackage ../development/python-modules/blinker { }; blockdiag = callPackage ../development/python-modules/blockdiag { }; From 81623784018793b1d267b744d2505891e5b29d25 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bernardy Date: Tue, 7 Aug 2018 10:36:04 +0200 Subject: [PATCH 3/3] python.pkgs.tensorflow 1.7.0 -> 1.9.0 --- .../python-modules/tensorflow/bin.nix | 24 +++++-------- .../python-modules/tensorflow/prefetcher.sh | 3 +- .../tensorflow/tf1.9.0-hashes.nix | 34 +++++++++++++++++++ 3 files changed, 45 insertions(+), 16 deletions(-) create mode 100644 pkgs/development/python-modules/tensorflow/tf1.9.0-hashes.nix diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index 42e35df7497a..b09da2d4cecf 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -10,6 +10,7 @@ , termcolor , protobuf , absl-py +, grpcio , mock , backports_weakref , enum34 @@ -38,38 +39,31 @@ let in buildPythonPackage rec { pname = "tensorflow"; - version = "1.7.1"; + version = "1.9.0"; format = "wheel"; src = let pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) "${python.majorVersion}"; - version = if stdenv.isDarwin then builtins.substring 0 1 pyVerNoDot else pyVerNoDot; + pyver = if stdenv.isDarwin then builtins.substring 0 1 pyVerNoDot else pyVerNoDot; platform = if stdenv.isDarwin then "mac" else "linux"; unit = if cudaSupport then "gpu" else "cpu"; - key = "${platform}_py_${version}_${unit}"; - dls = import ./tf1.7.1-hashes.nix; + key = "${platform}_py_${pyver}_${unit}"; + dls = import ./tf1.9.0-hashes.nix; in fetchurl dls.${key}; - propagatedBuildInputs = [ numpy six protobuf absl-py astor gast termcolor ] + propagatedBuildInputs = [ protobuf numpy termcolor grpcio six astor absl-py gast tensorflow-tensorboard ] ++ lib.optional (!isPy3k) mock - ++ lib.optionals (pythonOlder "3.4") [ backports_weakref enum34 ] - ++ lib.optional (pythonOlder "3.6") tensorflow-tensorboard; - - # tensorflow depends on tensorflow_tensorboard, which cannot be - # built at the moment (some of its dependencies do not build - # [htlm5lib9999999 (seven nines) -> tensorboard], and it depends on an old version of - # bleach) Hence we disable dependency checking for now. - installFlags = lib.optional isPy36 "--no-dependencies"; - + ++ lib.optionals (pythonOlder "3.4") [ backports_weakref enum34 ]; # Upstream has a pip hack that results in bin/tensorboard being in both tensorflow # and the propageted input tensorflow-tensorboard which causes environment collisions. - # + # another possibility would be to have tensorboard only in the buildInputs # https://github.com/tensorflow/tensorflow/blob/v1.7.1/tensorflow/tools/pip_package/setup.py#L79 postInstall = '' rm $out/bin/tensorboard ''; + installFlags = "--no-dependencies"; # tensorflow wants setuptools 39, can't allow that. # Note that we need to run *after* the fixup phase because the # libraries are loaded at runtime. If we run in preFixup then # patchelf --shrink-rpath will remove the cuda libraries. diff --git a/pkgs/development/python-modules/tensorflow/prefetcher.sh b/pkgs/development/python-modules/tensorflow/prefetcher.sh index ba9aa0bdf356..6b98ece974eb 100644 --- a/pkgs/development/python-modules/tensorflow/prefetcher.sh +++ b/pkgs/development/python-modules/tensorflow/prefetcher.sh @@ -1,4 +1,4 @@ -version=1.7.1 +version=1.9.0 hashfile=tf${version}-hashes.nix rm -f $hashfile echo "{" >> $hashfile @@ -27,3 +27,4 @@ for sys in "linux" "mac"; do done done done +echo "}" >> $hashfile diff --git a/pkgs/development/python-modules/tensorflow/tf1.9.0-hashes.nix b/pkgs/development/python-modules/tensorflow/tf1.9.0-hashes.nix new file mode 100644 index 000000000000..504ed7b5b957 --- /dev/null +++ b/pkgs/development/python-modules/tensorflow/tf1.9.0-hashes.nix @@ -0,0 +1,34 @@ +{ +linux_py_27_cpu = { + url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.9.0-cp27-none-linux_x86_64.whl"; + sha256 = "1dvmajv5ddgzrazdnxpfhk9dkj0lfiviw4jmvk00d4q5v68z6ihg"; +}; +linux_py_35_cpu = { + url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.9.0-cp35-cp35m-linux_x86_64.whl"; + sha256 = "07ilrxbhz9p3xwqhl2p8c40y1gsq68x10f34pzayrvcg2i52bvpv"; +}; +linux_py_36_cpu = { + url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.9.0-cp36-cp36m-linux_x86_64.whl"; + sha256 = "0x2l64ab7i8nr0dzvsryblhn869qyjb85xkhy69nwahqswb68hxl"; +}; +linux_py_27_gpu = { + url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.9.0-cp27-none-linux_x86_64.whl"; + sha256 = "0q7i82jgy0mzn2mw8i1z0pvv7ssi6m7zqkkjg2i4zxpk8djg8k6z"; +}; +linux_py_35_gpu = { + url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.9.0-cp35-cp35m-linux_x86_64.whl"; + sha256 = "0nhq2s8fanm095x1sc9h40dvqcv9bc2aj47crv3c2sajbj7dn43g"; +}; +linux_py_36_gpu = { + url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.9.0-cp36-cp36m-linux_x86_64.whl"; + sha256 = "1m4b9cd8ghghqxaqrlzq7j9499ddidgr78bx0c20pgyrzg38jiz1"; +}; +mac_py_2_cpu = { + url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py2-none-any.whl"; + sha256 = "1djj0xahzrmxhfc6kyjx1lkyfh7jhq3ix0gz9j3iq4smb3ca9z01"; +}; +mac_py_3_cpu = { + url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py3-none-any.whl"; + sha256 = "0igffy7r0d8mhkn4pybp19jmc25alfpfl4k4fxh2s3rvgii8gk22"; +}; +}