diff --git a/setup.py b/setup.py index aea3ba1ba4a1..d1eabf4faa43 100644 --- a/setup.py +++ b/setup.py @@ -13,17 +13,41 @@ # limitations under the License. import os -import sys -from setuptools import setup from setuptools import find_packages +from setuptools import setup -PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) +PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) -with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_obj: +with open(os.path.join(PACKAGE_ROOT, 'README.rst')) as file_obj: README = file_obj.read() +# NOTE: This is duplicated throughout and we should try to +# consolidate. +SETUP_BASE = { + 'author': 'Google Cloud Platform', + 'author_email': 'jjg+google-cloud-python@google.com', + 'scripts': [], + 'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python', + 'license': 'Apache 2.0', + 'platforms': 'Posix; MacOS X; Windows', + 'include_package_data': True, + 'zip_safe': False, + 'classifiers': [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Topic :: Internet', + ], +} + REQUIREMENTS = [ 'httplib2 >= 0.9.1', @@ -50,31 +74,12 @@ name='google-cloud', version='0.19.0', description='API Client library for Google Cloud', - author='Google Cloud Platform', - author_email='jjg+google-cloud-python@google.com', long_description=README, - scripts=[], - url='https://github.com/GoogleCloudPlatform/google-cloud-python', namespace_packages=[ 'google', 'google.cloud', ], packages=find_packages(), - license='Apache 2.0', - platforms='Posix; MacOS X; Windows', - include_package_data=True, - zip_safe=False, install_requires=REQUIREMENTS, - classifiers=[ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Topic :: Internet', - ] + **SETUP_BASE )