Skip to content

Commit

Permalink
Make grpcio dep optional for Python googleapis-common-protos (googlea…
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian J. Watson authored Sep 3, 2016
1 parent df0c73d commit 5a4b086
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/common_protos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ packages:
version: ''

# semver is the semantic version of the common protos package.
semver: 1.3.1
semver: 1.3.2
2 changes: 1 addition & 1 deletion config/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protobuf:

googleapis_common_protos:
python:
version: '1.3.1'
version: '1.3.2'
ruby:
version: '1.2.0'

Expand Down
8 changes: 6 additions & 2 deletions templates/commonpb/python/setup.py.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ import setuptools
from setuptools import setup, find_packages

install_requires = [
'protobuf>={{{dependencies.protobuf.python.version}}}',
'grpcio>={{{dependencies.grpc.python.version}}}'
'protobuf>={{{dependencies.protobuf.python.version}}}'
]

extras_require = {
'grpc': ['grpcio>={{{dependencies.grpc.python.version}}}']
}

setuptools.setup(
name='{{{api.name}}}',
version='{{{api.semantic_version}}}',
Expand All @@ -31,6 +34,7 @@ setuptools.setup(
description='Common protobufs used in Google APIs',
long_description=open('README.rst').read(),
install_requires=install_requires,
extras_require=extras_require,
license='{{{api.license}}}',
packages=find_packages(),
namespace_packages=[{{#api.nsPackages}}'{{{.}}}', {{/api.nsPackages}}],
Expand Down
2 changes: 1 addition & 1 deletion templates/python/setup.py.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ from setuptools import setup, find_packages
install_requires = [
'oauth2client>={{{dependencies.auth.python.version}}}',
'grpcio>={{{dependencies.grpc.python.version}}}',
'googleapis-common-protos>={{{dependencies.googleapis_common_protos.python.version}}}'
'googleapis-common-protos[grpc]>={{{dependencies.googleapis_common_protos.python.version}}}'
]

setuptools.setup(
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
install_requires = [
'oauth2client>=0.4.1',
'grpcio>=0.15.0',
'googleapis-common-protos>=1.2.0'
'googleapis-common-protos[grpc]>=1.2.0'
]

setuptools.setup(
Expand Down

0 comments on commit 5a4b086

Please sign in to comment.