Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit deb87a0

Browse files
author
Jon Wayne Parrott
authored
Normalize all setup.py files (#4909)
1 parent 919920f commit deb87a0

File tree

1 file changed

+55
-30
lines changed

1 file changed

+55
-30
lines changed

setup.py

Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017, Google LLC
1+
# Copyright 2018 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -12,35 +12,60 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""A setup module for the GAPIC Google Container Engine API library.
15+
import io
16+
import os
1617

17-
See:
18-
https://packaging.python.org/en/latest/distributing.html
19-
https://github.com/pypa/sampleproject
20-
"""
18+
import setuptools
2119

22-
from setuptools import setup, find_packages
23-
import io
24-
import sys
2520

26-
install_requires = [
27-
'google-api-core>=0.1.0, <0.2.0dev',
28-
'google-auth>=1.0.2, <2.0dev',
29-
'googleapis-common-protos[grpc]>=1.5.2, <2.0dev',
30-
'requests>=2.18.4, <3.0dev',
21+
# Package metadata.
22+
23+
name = 'google-cloud-container'
24+
description = 'Google Container Engine API client library'
25+
version = '0.1.1.dev1'
26+
# Should be one of:
27+
# 'Development Status :: 3 - Alpha'
28+
# 'Development Status :: 4 - Beta'
29+
# 'Development Status :: 5 - Stable'
30+
release_status = 'Development Status :: 3 - Alpha'
31+
dependencies = [
32+
'google-api-core[grpc]<0.2.0dev,>=0.1.0',
3133
]
34+
extras = {
35+
}
36+
37+
38+
# Setup boilerplate below this line.
39+
40+
package_root = os.path.abspath(os.path.dirname(__file__))
41+
42+
readme_filename = os.path.join(package_root, 'README.rst')
43+
with io.open(readme_filename, encoding='utf-8') as readme_file:
44+
readme = readme_file.read()
45+
46+
# Only include packages under the 'google' namespace. Do not include tests,
47+
# benchmarks, etc.
48+
packages = [
49+
package for package in setuptools.find_packages()
50+
if package.startswith('google')]
3251

33-
with io.open('README.rst', 'r', encoding='utf-8') as readme_file:
34-
long_description = readme_file.read()
52+
# Determine which namespaces are needed.
53+
namespaces = ['google']
54+
if 'google.cloud' in packages:
55+
namespaces.append('google.cloud')
3556

36-
setup(
37-
name='google-cloud-container',
38-
version='0.1.1.dev1',
39-
author='Google Inc',
57+
58+
setuptools.setup(
59+
name=name,
60+
version=version,
61+
description=description,
62+
long_description=readme,
63+
author='Google LLC',
4064
author_email='[email protected]',
65+
license='Apache 2.0',
66+
url='https://github.com/GoogleCloudPlatform/google-cloud-python',
4167
classifiers=[
42-
'Intended Audience :: Developers',
43-
'Development Status :: 3 - Alpha',
68+
release_status,
4469
'Intended Audience :: Developers',
4570
'License :: OSI Approved :: Apache Software License',
4671
'Programming Language :: Python',
@@ -50,14 +75,14 @@
5075
'Programming Language :: Python :: 3.4',
5176
'Programming Language :: Python :: 3.5',
5277
'Programming Language :: Python :: 3.6',
78+
'Operating System :: OS Independent',
79+
'Topic :: Internet',
5380
],
54-
description='GAPIC library for the Google Container Engine API',
55-
zip_safe=False,
81+
platforms='Posix; MacOS X; Windows',
82+
packages=packages,
83+
namespace_packages=namespaces,
84+
install_requires=dependencies,
85+
extras_require=extras,
5686
include_package_data=True,
57-
long_description=long_description,
58-
install_requires=install_requires,
59-
license='Apache 2.0',
60-
packages=find_packages(exclude=('tests*',)),
61-
namespace_packages=['google', 'google.cloud'],
62-
url='https://github.com/GoogleCloudPlatform/google-cloud-python',
87+
zip_safe=False,
6388
)

0 commit comments

Comments
 (0)