Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying setup.py to separate duplicated content. #2393

Merged
merged 1 commit into from
Sep 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
)