Add typing_extensions dependency. This is a very light dependency (roughly two Python files) that is useful to unlock typing features present only in the latest Python versions.
PiperOrigin-RevId: 327637134 Change-Id: Ifb4cd1314a6f8feee4f452a8256cff27c1acd590
This commit is contained in:
parent
4b51c480c1
commit
c725901d1b
@ -265,6 +265,7 @@ tensorflow/third_party/toolchains/remote_config/BUILD
|
||||
tensorflow/third_party/toolchains/remote_config/configs.bzl
|
||||
tensorflow/third_party/toolchains/remote_config/containers.bzl
|
||||
tensorflow/third_party/toolchains/remote_config/rbe_config.bzl
|
||||
tensorflow/third_party/typing_extensions.BUILD
|
||||
tensorflow/third_party/wrapt.BUILD
|
||||
tensorflow/third_party/zlib.BUILD
|
||||
tensorflow/tools/build_info/BUILD
|
||||
|
@ -142,6 +142,7 @@ function install_pip_deps {
|
||||
${SUDO_CMD} ${PIP_CMD} install portpicker
|
||||
${SUDO_CMD} ${PIP_CMD} install scipy
|
||||
${SUDO_CMD} ${PIP_CMD} install scikit-learn
|
||||
${SUDO_CMD} ${PIP_CMD} install typing_extensions
|
||||
${SUDO_CMD} ${PIP_CMD} install --upgrade tb-nightly
|
||||
${PIP_CMD} install --user --upgrade flatbuffers
|
||||
${PIP_CMD} install --user --upgrade attrs
|
||||
@ -178,6 +179,7 @@ function install_ubuntu_16_pip_deps {
|
||||
"${PIP_CMD}" install portpicker --user
|
||||
"${PIP_CMD}" install scipy --user
|
||||
"${PIP_CMD}" install scikit-learn --user
|
||||
"${PIP_CMD}" install typing_extensions --user
|
||||
"${PIP_CMD}" install PyYAML==3.13 --user
|
||||
# b/156523241
|
||||
"${PIP_CMD}" install --force-reinstall --user --upgrade tf-estimator-nightly
|
||||
|
@ -67,6 +67,7 @@ REQUIRED_PACKAGES = [
|
||||
'tensorboard >= 2.3.0, < 3',
|
||||
'tensorflow_estimator >= 2.3.0, < 2.4.0',
|
||||
'termcolor >= 1.1.0',
|
||||
'typing_extensions >= 3.7.4.2',
|
||||
'wrapt >= 1.11.1',
|
||||
'wheel >= 0.26',
|
||||
'six >= 1.12.0',
|
||||
|
@ -514,6 +514,18 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
|
||||
],
|
||||
)
|
||||
|
||||
tf_http_archive(
|
||||
name = "typing_extensions_archive",
|
||||
build_file = clean_dep("//third_party:typing_extensions.BUILD"),
|
||||
sha256 = "79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962a1e6a1815969ae",
|
||||
strip_prefix = "typing_extensions-3.7.4.2",
|
||||
system_build_file = clean_dep("//third_party/systemlibs:six.BUILD"),
|
||||
urls = [
|
||||
"http://mirror.tensorflow.org/files.pythonhosted.org/packages/6a/28/d32852f2af6b5ead85d396249d5bdf450833f3a69896d76eb480d9c5e406/typing_extensions-3.7.4.2.tar.gz",
|
||||
"https://files.pythonhosted.org/packages/6a/28/d32852f2af6b5ead85d396249d5bdf450833f3a69896d76eb480d9c5e406/typing_extensions-3.7.4.2.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
tf_http_archive(
|
||||
name = "opt_einsum_archive",
|
||||
build_file = clean_dep("//third_party:opt_einsum.BUILD"),
|
||||
|
14
third_party/typing_extensions.BUILD
vendored
Normal file
14
third_party/typing_extensions.BUILD
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
# Description:
|
||||
# Backports for the typing module to older Python versions. See
|
||||
# https://github.com/python/typing/blob/master/typing_extensions/README.rst
|
||||
|
||||
licenses(["notice"]) # PSF
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
py_library(
|
||||
name = "typing_extensions",
|
||||
srcs = ["src_py3/typing_extensions.py"],
|
||||
srcs_version = "PY2AND3",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
Loading…
Reference in New Issue
Block a user