Skip to content

Commit

Permalink
Modifying setup.py to separate duplicated content.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Sep 22, 2016
1 parent 1304678 commit 6f5bf6a
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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
)

0 comments on commit 6f5bf6a

Please sign in to comment.