summary refs log tree commit diff
diff options
context:
space:
mode:
authorNoah D. Brenowitz <nbren12@gmail.com>2021-03-15 19:37:50 -0700
committerNoah D. Brenowitz <nbren12@gmail.com>2021-04-08 07:53:19 +0000
commit5542995561a2c9bcf467f2d55915e1078b286d2b (patch)
tree298872824b34fe0675415e84c391936c60f2f9c2
parent1e48ad0403f20f73c67dccb782aff69c532d3d50 (diff)
downloadnixpkgs-5542995561a2c9bcf467f2d55915e1078b286d2b.tar
nixpkgs-5542995561a2c9bcf467f2d55915e1078b286d2b.tar.gz
nixpkgs-5542995561a2c9bcf467f2d55915e1078b286d2b.tar.bz2
nixpkgs-5542995561a2c9bcf467f2d55915e1078b286d2b.tar.lz
nixpkgs-5542995561a2c9bcf467f2d55915e1078b286d2b.tar.xz
nixpkgs-5542995561a2c9bcf467f2d55915e1078b286d2b.tar.zst
nixpkgs-5542995561a2c9bcf467f2d55915e1078b286d2b.zip
python37Packages.tensorflow-bin_2: soften additional versions
This package was broken on mac with some wildcarding issues.
Some more constraints in the tensorflow wheel needed to be relaxed.
-rw-r--r--pkgs/development/python-modules/tensorflow/bin.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix
index ef6d4f45ef9..7b9cbf1f990 100644
--- a/pkgs/development/python-modules/tensorflow/bin.nix
+++ b/pkgs/development/python-modules/tensorflow/bin.nix
@@ -96,10 +96,19 @@ in buildPythonPackage {
     # Unpack the wheel file.
     wheel unpack --dest unpacked ./*.whl
 
-    # Tensorflow has a hard dependency on gast==0.2.2, but we relax it to
-    # gast==0.3.2.
-    substituteInPlace ./unpacked/tensorflow*/tensorflow_core/tools/pip_package/setup.py --replace "gast == 0.2.2" "gast == 0.3.2"
-    substituteInPlace ./unpacked/tensorflow*/tensorflow_*.dist-info/METADATA --replace "gast (==0.2.2)" "gast (==0.3.2)"
+    # Tensorflow wheels tightly constrain the versions of gast, tensorflow-estimator and scipy.
+    # This code relaxes these requirements:
+    substituteInPlace ./unpacked/tensorflow*/tensorflow_core/tools/pip_package/setup.py \
+      --replace "tensorflow_estimator >= 2.1.0rc0, < 2.2.0" "tensorflow_estimator" \
+      --replace "tensorboard >= 2.1.0, < 2.2.0" "tensorboard" \
+      --replace "gast == 0.2.2" "gast"  \
+      --replace "scipy == 1.2.2" "scipy"
+
+    substituteInPlace ./unpacked/tensorflow*/tensorflow*.dist-info/METADATA  \
+      --replace "gast (==0.2.2)" "gast" \
+      --replace "tensorflow-estimator (<2.2.0,>=2.1.0rc0)" "tensorflow_estimator" \
+      --replace "tensorboard (<2.2.0,>=2.1.0)" "tensorboard" \
+      --replace "scipy (==1.4.1)" "scipy"
 
     # Pack the wheel file back up.
     wheel pack ./unpacked/tensorflow*