diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py index 806ad2d0cdb..4b8289a6202 100644 --- a/tensorflow/tools/pip_package/setup.py +++ b/tensorflow/tools/pip_package/setup.py @@ -55,12 +55,10 @@ _VERSION = '2.2.0' REQUIRED_PACKAGES = [ 'absl-py >= 0.7.0', 'astunparse == 1.6.3', - 'backports.weakref >= 1.0rc1;python_version<"3.4"', - 'enum34 >= 1.1.6;python_version<"3.4"', 'gast == 0.3.3', 'google_pasta >= 0.1.8', 'h5py >= 2.10.0, < 2.11.0', - 'keras_preprocessing == 1.1.0', + 'keras_preprocessing >= 1.1.1, < 1.2', 'numpy >= 1.16.0, < 2.0', 'opt_einsum >= 2.3.2', 'protobuf >= 3.9.2', @@ -68,18 +66,10 @@ REQUIRED_PACKAGES = [ 'tensorflow_estimator >= 2.2.0, < 2.3.0', 'termcolor >= 1.1.0', 'wrapt >= 1.11.1', - # python3 requires wheel 0.26 - 'wheel >= 0.26;python_version>="3"', - 'wheel;python_version<"3"', - # mock comes with unittest.mock for python3, need to install for python2 - 'mock >= 2.0.0;python_version<"3"', - # functools comes with python3, need to install the backport for python2 - 'functools32 >= 3.2.3;python_version<"3"', + 'wheel >= 0.26', 'six >= 1.12.0', # scipy < 1.4.1 causes segfaults due to pybind11 - # Latest scipy pip for py2 is scipy==1.2.2 - 'scipy == 1.4.1;python_version>="3"', - 'scipy == 1.2.2;python_version<"3"', + 'scipy == 1.4.1', ] if sys.byteorder == 'little': @@ -100,8 +90,6 @@ if 'tf_nightly' in project_name: for i, pkg in enumerate(REQUIRED_PACKAGES): if 'tensorboard' in pkg: REQUIRED_PACKAGES[i] = 'tb-nightly >= 2.3.0a0, < 2.4.0a0' - elif 'tensorflow_estimator' in pkg and '2.0' in project_name: - REQUIRED_PACKAGES[i] = 'tensorflow-estimator-2.0-preview' elif 'tensorflow_estimator' in pkg: REQUIRED_PACKAGES[i] = 'tf-estimator-nightly' @@ -121,11 +109,6 @@ CONSOLE_SCRIPTS = [ ] # pylint: enable=line-too-long -# Only keep freeze_graph console script in 1.X. -if _VERSION.startswith('1.') and '_2.0' not in project_name: - CONSOLE_SCRIPTS.append( - 'freeze_graph = tensorflow.python.tools.freeze_graph:run_main') - # remove the tensorboard console script if building tf_nightly if 'tf_nightly' in project_name: CONSOLE_SCRIPTS.remove('tensorboard = tensorboard.main:run_main')