python3Packages.tensorflow-bin: 2.4.0 -> 2.7.0
This commit is contained in:
parent
148be0ecca
commit
0701680d0c
5 changed files with 39 additions and 135 deletions
|
@ -42,15 +42,11 @@ assert ! (stdenv.isDarwin && cudaSupport);
|
||||||
|
|
||||||
let
|
let
|
||||||
packages = import ./binary-hashes.nix;
|
packages = import ./binary-hashes.nix;
|
||||||
metadataPatch = ./relax-dependencies-metadata.patch;
|
|
||||||
patch = ./relax-dependencies.patch;
|
|
||||||
in buildPythonPackage {
|
in buildPythonPackage {
|
||||||
pname = "tensorflow" + lib.optionalString cudaSupport "-gpu";
|
pname = "tensorflow" + lib.optionalString cudaSupport "-gpu";
|
||||||
inherit (packages) version;
|
inherit (packages) version;
|
||||||
format = "wheel";
|
format = "wheel";
|
||||||
|
|
||||||
disabled = pythonAtLeast "3.9";
|
|
||||||
|
|
||||||
src = let
|
src = let
|
||||||
pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) python.pythonVersion;
|
pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) python.pythonVersion;
|
||||||
platform = if stdenv.isDarwin then "mac" else "linux";
|
platform = if stdenv.isDarwin then "mac" else "linux";
|
||||||
|
@ -93,13 +89,18 @@ in buildPythonPackage {
|
||||||
pushd dist
|
pushd dist
|
||||||
|
|
||||||
wheel unpack --dest unpacked ./*.whl
|
wheel unpack --dest unpacked ./*.whl
|
||||||
|
rm ./*.whl
|
||||||
(
|
(
|
||||||
cd unpacked/tensorflow*
|
cd unpacked/tensorflow*
|
||||||
# relax too strict versions in setup.py
|
# Adjust dependency requirements:
|
||||||
patch -p 1 < ${patch}
|
# - Relax gast version requirement that doesn't match what we have packaged
|
||||||
cd *.dist-info
|
# - The purpose of python3Packages.libclang is not clear at the moment and we don't have it packaged yet
|
||||||
# relax too strict versions in *.dist-info/METADATA
|
# - keras and tensorlow-io-gcs-filesystem will be considered as optional for now.
|
||||||
patch -p 3 < ${metadataPatch}
|
sed -i *.dist-info/METADATA \
|
||||||
|
-e "s/Requires-Dist: gast.*/Requires-Dist: gast/" \
|
||||||
|
-e "/Requires-Dist: libclang/d" \
|
||||||
|
-e "/Requires-Dist: keras/d" \
|
||||||
|
-e "/Requires-Dist: tensorflow-io-gcs-filesystem/d"
|
||||||
)
|
)
|
||||||
wheel pack ./unpacked/tensorflow*
|
wheel pack ./unpacked/tensorflow*
|
||||||
|
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
{
|
{
|
||||||
version = "2.4.0";
|
version = "2.7.0";
|
||||||
linux_py_36_cpu = {
|
|
||||||
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.4.0-cp36-cp36m-manylinux2010_x86_64.whl";
|
|
||||||
sha256 = "0pn0cjf50q0xsv6k0vihrz22kr392anznvdhxv80gk52c6lcgmsc";
|
|
||||||
};
|
|
||||||
linux_py_37_cpu = {
|
linux_py_37_cpu = {
|
||||||
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.4.0-cp37-cp37m-manylinux2010_x86_64.whl";
|
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.7.0-cp37-cp37m-manylinux2010_x86_64.whl";
|
||||||
sha256 = "0mdd83c0invqfy58qmpa3hk4yml5ic7wlwggyd5wpikadlv8vq89";
|
sha256 = "1irw4ri1fbxbj251cnjbr12gxsyj2k30asxjfxjpxhc9b0cchhx0";
|
||||||
};
|
};
|
||||||
linux_py_38_cpu = {
|
linux_py_38_cpu = {
|
||||||
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.4.0-cp38-cp38-manylinux2010_x86_64.whl";
|
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.7.0-cp38-cp38-manylinux2010_x86_64.whl";
|
||||||
sha256 = "1mm1yz9aj3v6fxfpxh7wy37rvsncr0b5y6glqlcxmhr6mqfp8k6d";
|
sha256 = "11a1rimr998lvvjdg03rqr8h2h7x6bbd4gyv74biwgaxmjczvjdj";
|
||||||
};
|
};
|
||||||
linux_py_36_gpu = {
|
linux_py_39_cpu = {
|
||||||
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.4.0-cp36-cp36m-manylinux2010_x86_64.whl";
|
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.7.0-cp39-cp39-manylinux2010_x86_64.whl";
|
||||||
sha256 = "113iygiq2kmj97g0glhcqng6rhl3rrj1iqw5xj1d5hla8xjy8cfv";
|
sha256 = "0x1zzmgq7hl2k98p8870h0yhaik39nc1ckvxirjx8simpj8ghsbp";
|
||||||
};
|
};
|
||||||
linux_py_37_gpu = {
|
linux_py_37_gpu = {
|
||||||
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.4.0-cp37-cp37m-manylinux2010_x86_64.whl";
|
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.7.0-cp37-cp37m-manylinux2010_x86_64.whl";
|
||||||
sha256 = "19ap8xx2j5nbmnqv5rzf1ryfvw2fbs6bm0fxjqrvhc3jxys6yqqs";
|
sha256 = "1x5yyxzkly9gdyhcfq4x7w7sqqxh6cw5qnfwbvzj5349xwrm63wi";
|
||||||
};
|
};
|
||||||
linux_py_38_gpu = {
|
linux_py_38_gpu = {
|
||||||
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.4.0-cp38-cp38-manylinux2010_x86_64.whl";
|
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.7.0-cp38-cp38-manylinux2010_x86_64.whl";
|
||||||
sha256 = "0ly3cinzj6j3b547sw8bd3p774khn3b14cgrj7nvfrz668d3f89x";
|
sha256 = "0prxa8yc6lbq62vnh8cw6dhcrnkdjih62kbg6pbw4gmgcbf6v6fg";
|
||||||
};
|
};
|
||||||
mac_py_36_cpu = {
|
linux_py_39_gpu = {
|
||||||
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.4.0-cp36-cp36m-macosx_10_14_x86_64.whl";
|
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.7.0-cp39-cp39-manylinux2010_x86_64.whl";
|
||||||
sha256 = "1b5ld1wj48l1i5s3vk8db5m578zdg4xfl0m1lc8w5lx1vi4cwsjp";
|
sha256 = "0jjv8vm20d0airml68bxhassp4yg09rcz2a39aa511cz8mavj0l6";
|
||||||
};
|
};
|
||||||
mac_py_37_cpu = {
|
mac_py_37_cpu = {
|
||||||
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.4.0-cp37-cp37m-macosx_10_14_x86_64.whl";
|
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.7.0-cp37-cp37m-macosx_10_11_x86_64.whl";
|
||||||
sha256 = "1mgfyjgcwvx5jzawrpfnbch5sqw7kpnzp35rfxj22kwdsl28r47r";
|
sha256 = "1gr95ck0h4wzhdacjfhkzxdw4zglm85fc54swqhyzzv1f5n9vw8j";
|
||||||
};
|
};
|
||||||
mac_py_38_cpu = {
|
mac_py_38_cpu = {
|
||||||
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.4.0-cp38-cp38-macosx_10_14_x86_64.whl";
|
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.7.0-cp38-cp38-macosx_10_11_x86_64.whl";
|
||||||
sha256 = "034qh0nk786wxzma58179g086x479c3pd9vi8v8p26grs6f2fm0p";
|
sha256 = "1h3qlvlrwyvxynh5flvyqk7grbvyqc21ljqhlvds436hpn2kqrgb";
|
||||||
|
};
|
||||||
|
mac_py_39_cpu = {
|
||||||
|
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.7.0-cp39-cp39-macosx_10_11_x86_64.whl";
|
||||||
|
sha256 = "0pyj1p2yik6ysdqn8n6cz1nqni0s9xx51ifmvdx4dl3hrzp86jz2";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
version="2.4.0"
|
version="2.7.0"
|
||||||
|
|
||||||
bucket="https://storage.googleapis.com/tensorflow"
|
bucket="https://storage.googleapis.com/tensorflow"
|
||||||
|
|
||||||
|
@ -8,15 +8,15 @@ bucket="https://storage.googleapis.com/tensorflow"
|
||||||
# on the following page:
|
# on the following page:
|
||||||
# https://www.tensorflow.org/install/pip?lang=python3#package-location
|
# https://www.tensorflow.org/install/pip?lang=python3#package-location
|
||||||
url_and_key_list=(
|
url_and_key_list=(
|
||||||
"linux_py_36_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp36-cp36m-manylinux2010_x86_64.whl"
|
|
||||||
"linux_py_37_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl"
|
"linux_py_37_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl"
|
||||||
"linux_py_38_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp38-cp38-manylinux2010_x86_64.whl"
|
"linux_py_38_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp38-cp38-manylinux2010_x86_64.whl"
|
||||||
"linux_py_36_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp36-cp36m-manylinux2010_x86_64.whl"
|
"linux_py_39_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp39-cp39-manylinux2010_x86_64.whl"
|
||||||
"linux_py_37_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl"
|
"linux_py_37_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp37-cp37m-manylinux2010_x86_64.whl"
|
||||||
"linux_py_38_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp38-cp38-manylinux2010_x86_64.whl"
|
"linux_py_38_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp38-cp38-manylinux2010_x86_64.whl"
|
||||||
"mac_py_36_cpu $bucket/mac/cpu/tensorflow-${version}-cp36-cp36m-macosx_10_14_x86_64.whl"
|
"linux_py_39_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp39-cp39-manylinux2010_x86_64.whl"
|
||||||
"mac_py_37_cpu $bucket/mac/cpu/tensorflow-${version}-cp37-cp37m-macosx_10_14_x86_64.whl"
|
"mac_py_37_cpu $bucket/mac/cpu/tensorflow-${version}-cp37-cp37m-macosx_10_11_x86_64.whl"
|
||||||
"mac_py_38_cpu $bucket/mac/cpu/tensorflow-${version}-cp38-cp38-macosx_10_14_x86_64.whl"
|
"mac_py_38_cpu $bucket/mac/cpu/tensorflow-${version}-cp38-cp38-macosx_10_11_x86_64.whl"
|
||||||
|
"mac_py_39_cpu $bucket/mac/cpu/tensorflow-${version}-cp39-cp39-macosx_10_11_x86_64.whl"
|
||||||
)
|
)
|
||||||
|
|
||||||
hashfile=binary-hashes.nix
|
hashfile=binary-hashes.nix
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
diff -ur unpacked/tensorflow-2.4.0/tensorflow-2.4.0.dist-info/METADATA unpacked.new/tensorflow-2.4.0/tensorflow-2.4.0.dist-info/METADATA
|
|
||||||
--- unpacked/tensorflow-2.4.0/tensorflow-2.4.0.dist-info/METADATA 2021-05-06 23:51:40.298995191 -0700
|
|
||||||
+++ unpacked.new/tensorflow-2.4.0/tensorflow-2.4.0.dist-info/METADATA 2021-05-07 00:03:49.856882153 -0700
|
|
||||||
@@ -27,24 +27,24 @@
|
|
||||||
Classifier: Topic :: Software Development :: Libraries
|
|
||||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
||||||
Description-Content-Type: text/markdown
|
|
||||||
-Requires-Dist: absl-py (~=0.10)
|
|
||||||
-Requires-Dist: astunparse (~=1.6.3)
|
|
||||||
-Requires-Dist: flatbuffers (~=1.12.0)
|
|
||||||
-Requires-Dist: google-pasta (~=0.2)
|
|
||||||
-Requires-Dist: h5py (~=2.10.0)
|
|
||||||
-Requires-Dist: keras-preprocessing (~=1.1.2)
|
|
||||||
-Requires-Dist: numpy (~=1.19.2)
|
|
||||||
-Requires-Dist: opt-einsum (~=3.3.0)
|
|
||||||
-Requires-Dist: protobuf (>=3.9.2)
|
|
||||||
-Requires-Dist: six (~=1.15.0)
|
|
||||||
-Requires-Dist: termcolor (~=1.1.0)
|
|
||||||
-Requires-Dist: typing-extensions (~=3.7.4)
|
|
||||||
-Requires-Dist: wheel (~=0.35)
|
|
||||||
-Requires-Dist: wrapt (~=1.12.1)
|
|
||||||
-Requires-Dist: gast (==0.3.3)
|
|
||||||
-Requires-Dist: tensorboard (~=2.4)
|
|
||||||
-Requires-Dist: tensorflow-estimator (<2.5.0,>=2.4.0rc0)
|
|
||||||
-Requires-Dist: grpcio (~=1.32.0)
|
|
||||||
+Requires-Dist: absl-py
|
|
||||||
+Requires-Dist: astunparse
|
|
||||||
+Requires-Dist: flatbuffers
|
|
||||||
+Requires-Dist: google-pasta
|
|
||||||
+Requires-Dist: h5py
|
|
||||||
+Requires-Dist: keras-preprocessing
|
|
||||||
+Requires-Dist: numpy
|
|
||||||
+Requires-Dist: opt-einsum
|
|
||||||
+Requires-Dist: protobuf
|
|
||||||
+Requires-Dist: six
|
|
||||||
+Requires-Dist: termcolor
|
|
||||||
+Requires-Dist: typing-extensions
|
|
||||||
+Requires-Dist: wheel
|
|
||||||
+Requires-Dist: wrapt
|
|
||||||
+Requires-Dist: gast
|
|
||||||
+Requires-Dist: tensorboard
|
|
||||||
+Requires-Dist: tensorflow-estimator
|
|
||||||
+Requires-Dist: grpcio
|
|
||||||
|
|
||||||
[![Python](https://img.shields.io/pypi/pyversions/tensorflow.svg?style=plastic)](https://badge.fury.io/py/tensorflow)
|
|
||||||
[![PyPI](https://badge.fury.io/py/tensorflow.svg)](https://badge.fury.io/py/tensorflow)
|
|
|
@ -1,51 +0,0 @@
|
||||||
diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py
|
|
||||||
index 65133afdafe..8ef6364ff7e 100644
|
|
||||||
--- a/tensorflow/tools/pip_package/setup.py
|
|
||||||
+++ b/tensorflow/tools/pip_package/setup.py
|
|
||||||
@@ -75,23 +75,23 @@ if '--project_name' in sys.argv:
|
|
||||||
# comment the versioning scheme.
|
|
||||||
# NOTE: Please add test only packages to `TEST_PACKAGES` below.
|
|
||||||
REQUIRED_PACKAGES = [
|
|
||||||
- 'absl-py ~= 0.10',
|
|
||||||
- 'astunparse ~= 1.6.3',
|
|
||||||
- 'flatbuffers ~= 1.12.0',
|
|
||||||
- 'google_pasta ~= 0.2',
|
|
||||||
- 'h5py ~= 2.10.0',
|
|
||||||
- 'keras_preprocessing ~= 1.1.2',
|
|
||||||
- 'numpy ~= 1.19.2',
|
|
||||||
- 'opt_einsum ~= 3.3.0',
|
|
||||||
+ 'absl-py >= 0.10',
|
|
||||||
+ 'astunparse >= 1.6.3',
|
|
||||||
+ 'flatbuffers >= 1.12.0',
|
|
||||||
+ 'google_pasta >= 0.2',
|
|
||||||
+ 'h5py >= 2.10.0',
|
|
||||||
+ 'keras_preprocessing >= 1.1.2',
|
|
||||||
+ 'numpy >= 1.19.1',
|
|
||||||
+ 'opt_einsum >= 3.3.0',
|
|
||||||
'protobuf >= 3.9.2',
|
|
||||||
- 'six ~= 1.15.0',
|
|
||||||
- 'termcolor ~= 1.1.0',
|
|
||||||
- 'typing_extensions ~= 3.7.4',
|
|
||||||
- 'wheel ~= 0.35',
|
|
||||||
- 'wrapt ~= 1.12.1',
|
|
||||||
+ 'six >= 1.15.0',
|
|
||||||
+ 'termcolor >= 1.1.0',
|
|
||||||
+ 'typing_extensions >= 3.7.4',
|
|
||||||
+ 'wheel >= 0.34.2',
|
|
||||||
+ 'wrapt >= 1.12.1',
|
|
||||||
# These packages needs to be pinned exactly as newer versions are
|
|
||||||
# incompatible with the rest of the ecosystem
|
|
||||||
- 'gast == 0.3.3',
|
|
||||||
+ 'gast >= 0.3.3',
|
|
||||||
# TensorFlow ecosystem packages that TF exposes API for
|
|
||||||
# These need to be in sync with the existing TF version
|
|
||||||
# They are updated during the release process
|
|
||||||
@@ -118,7 +118,7 @@ if 'tf_nightly' in project_name:
|
|
||||||
# BoringSSL support.
|
|
||||||
# See https://github.com/tensorflow/tensorflow/issues/17882.
|
|
||||||
if sys.byteorder == 'little':
|
|
||||||
- REQUIRED_PACKAGES.append('grpcio ~= 1.32.0')
|
|
||||||
+ REQUIRED_PACKAGES.append('grpcio >= 1.31.0')
|
|
||||||
|
|
||||||
|
|
||||||
# Packages which are only needed for testing code.
|
|
Loading…
Reference in a new issue