Cleanup `setup.py`
Remove python 2 and TF 1.x stanzas. Also make keras_preprocessing be between 1.1.1 and 1.2. PiperOrigin-RevId: 311475047 Change-Id: I4ba517cb8babd609e83d031c86afb6670d34c757
This commit is contained in:
parent
2f8ea36a44
commit
2a55f04924
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue