From dd31737cb75246b5707944d644bf7feeb3571696 Mon Sep 17 00:00:00 2001 From: Michael Reneer Date: Fri, 28 Jan 2022 12:33:31 -0800 Subject: [PATCH] Update the `setup.py` for TensorFlow Privacy. * Removed stale documentation. * Updated to read version from the `version.py` module. * Remove test only dependency. PiperOrigin-RevId: 424932559 --- setup.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 8f86d33..cbf9e47 100644 --- a/setup.py +++ b/setup.py @@ -12,22 +12,27 @@ # See the License for the specific language governing permissions and # limitations under the License. """TensorFlow Privacy library setup file for pip.""" + from setuptools import find_packages from setuptools import setup +with open('tensorflow_privacy/version.py') as file: + globals_dict = {} + exec(file.read(), globals_dict) # pylint: disable=exec-used + VERSION = globals_dict['__version__'] + setup( name='tensorflow_privacy', - version='0.7.3', + version=VERSION, url='https://github.com/tensorflow/privacy', license='Apache-2.0', install_requires=[ - 'attrs>=21.2.0', # for tree_aggregation_query.py. - 'dm-tree~=0.1.1', # used in tests only - 'mpmath', # used in tests only + 'attrs>=21.2.0', + 'dm-tree~=0.1.1', 'scipy>=0.17', 'tensorflow-datasets>=4.4.0', - 'tensorflow-estimator>=2.3.0', # for DP versions of estimator. - 'tensorflow-probability>=0.13.0', # For discrete Gaussian. + 'tensorflow-estimator>=2.3.0', + 'tensorflow-probability>=0.13.0', ], # Explicit dependence on TensorFlow is not supported. # See https://github.com/tensorflow/tensorflow/issues/7166