summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-10-16 13:09:56 +0200
committerGitHub <noreply@github.com>2022-10-16 05:09:56 -0600
commitf7f11fc88117703f287134bd63a5c12bc47bff1d (patch)
tree52959d76b96496dd7af2e430f7fc70af181c11ed /var
parent496f4193a6083956089d6d7f5f804c15012b3227 (diff)
downloadspack-f7f11fc88117703f287134bd63a5c12bc47bff1d.tar.gz
spack-f7f11fc88117703f287134bd63a5c12bc47bff1d.tar.bz2
spack-f7f11fc88117703f287134bd63a5c12bc47bff1d.tar.xz
spack-f7f11fc88117703f287134bd63a5c12bc47bff1d.zip
py-tensorflow: fix zlib (#33349)
* py-tensorflow: fix zlib * [@spackbot] updating style on behalf of haampie Co-authored-by: haampie <haampie@users.noreply.github.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-tensorflow-metadata/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-tensorflow/package.py10
2 files changed, 16 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/py-tensorflow-metadata/package.py b/var/spack/repos/builtin/packages/py-tensorflow-metadata/package.py
index 363579b7a5..07e09d4bf4 100644
--- a/var/spack/repos/builtin/packages/py-tensorflow-metadata/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorflow-metadata/package.py
@@ -22,6 +22,13 @@ class PyTensorflowMetadata(PythonPackage):
version("1.10.0", sha256="e7aa81aa01433e2a75c11425affd55125b64f384baf96b71eeb3a88dca8cf2ae")
version("1.5.0", sha256="f0ec8aaf62fd772ef908efe4ee5ea3bc0d67dcbf10ae118415b7b206a1d61745")
+ # Fix non-existing zlib URL
+ patch(
+ "https://github.com/tensorflow/metadata/commit/8df679e782f5bf2d163d63e550d8752c3812d566.patch?full_index=1",
+ sha256="a6b294d5e6099979192fcdb4d5b7b0388dc30b48671944d22e51a9e6bd5e1490",
+ when="@1.10.0",
+ )
+
depends_on("bazel@0.24.1:", type="build")
depends_on("python@3.7:3", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py
index 5c6b3dc1ac..5c2bcb759a 100644
--- a/var/spack/repos/builtin/packages/py-tensorflow/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py
@@ -440,8 +440,16 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage):
conflicts("~rocm", when="@2.7.4-rocm-enhanced")
conflicts("+rocm", when="@:2.7.4-a,2.7.4.0:")
- # TODO: why is this needed?
+ # zlib is vendored and downloaded directly from zlib.org (or mirrors), but
+ # old downloads are removed from that site immediately after a new release.
+ # If the tf mirrors don't work, make sure the fallback is to something existing.
patch("url-zlib.patch", when="@0.10.0")
+ # bump to zlib 1.2.13
+ patch(
+ "https://github.com/tensorflow/tensorflow/commit/76b9fa22857148a562f3d9b5af6843402a93c15b.patch?full_index=1",
+ sha256="f9e26c544da729cfd376dbd3b096030e3777d3592459add1f3c78b1b9828d493",
+ when="@2.9:2.10.0",
+ )
# TODO: why is this needed?
patch("crosstool.patch", when="@0.10.0+cuda")
# Avoid build error: "no such package '@io_bazel_rules_docker..."