Skip to content

Commit 6f09ebd

Browse files
authored
Merge pull request #2308 from dhermes/followup-2304
Remove gRPC/GAX conditional checks.
2 parents d861610 + 27a6c42 commit 6f09ebd

File tree

5 files changed

+9
-48
lines changed

5 files changed

+9
-48
lines changed

appveyor/requirements.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,4 @@
33
# pip will build them from source using the MSVC compiler matching the
44
# target Python version and architecture
55
wheel
6-
pytest
76
tox
8-
cryptography
9-
grpcio >= 1.0rc1
10-
grpc-google-pubsub-v1
11-
grpc-google-logging-v2
12-
gax-google-pubsub-v1
13-
gax-google-logging-v2

google/cloud/bigtable/__init__.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,3 @@
1616

1717

1818
from google.cloud.bigtable.client import Client
19-
20-
21-
_ERR_MSG = """\
22-
gRPC is required for using the Cloud Bigtable API, but
23-
importing the gRPC library (grpcio in PyPI) has failed.
24-
25-
As of June 2016, grpcio is only supported in Python 2.7,
26-
which unfortunately means the Cloud Bigtable API isn't
27-
available if you're using Python 3 or Python < 2.7.
28-
29-
If you're using Python 2.7 and importing / installing
30-
grpcio has failed, this likely means you have a non-standard version
31-
of Python installed. Check http://grpc.io if you're
32-
having trouble installing the grpcio package.
33-
"""
34-
35-
try:
36-
import grpc
37-
except ImportError as exc: # pragma: NO COVER
38-
raise ImportError(_ERR_MSG, exc)

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
from setuptools import setup
55
from setuptools import find_packages
66

7-
here = os.path.abspath(os.path.dirname(__file__))
87

8+
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
99

10-
with open(os.path.join(here, 'README.rst')) as f:
11-
README = f.read()
10+
with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_obj:
11+
README = file_obj.read()
1212

1313

1414
REQUIREMENTS = [
@@ -19,7 +19,7 @@
1919
'six',
2020
]
2121

22-
GRPC_EXTRAS = [
22+
GRPC_PACKAGES = [
2323
'grpcio >= 1.0rc1',
2424
'google-gax >= 0.12.3, < 0.13dev',
2525
'gax-google-pubsub-v1 >= 0.8.0, < 0.9dev',
@@ -28,8 +28,9 @@
2828
'grpc-google-logging-v2 >= 0.8.0, < 0.9dev',
2929
]
3030

31-
if sys.version_info[:2] == (2, 7) and 'READTHEDOCS' not in os.environ:
32-
REQUIREMENTS.extend(GRPC_EXTRAS)
31+
RTD_ENV_VAR = 'READTHEDOCS'
32+
if RTD_ENV_VAR not in os.environ:
33+
REQUIREMENTS.extend(GRPC_PACKAGES)
3334

3435
setup(
3536
name='google-cloud',
@@ -52,7 +53,6 @@
5253
include_package_data=True,
5354
zip_safe=False,
5455
install_requires=REQUIREMENTS,
55-
extras_require={'grpc': GRPC_EXTRAS},
5656
classifiers=[
5757
'Development Status :: 4 - Beta',
5858
'Intended Audience :: Developers',

system_tests/attempt_system_tests.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
from run_system_test import run_module_tests
5757

5858

59-
BIGTABLE_API = 'bigtable'
6059
MODULES = ( # ordered from most to least stable
6160
'datastore',
6261
'storage',
@@ -66,7 +65,7 @@
6665
'logging',
6766
'translate',
6867
'monitoring',
69-
BIGTABLE_API,
68+
'bigtable',
7069
)
7170

7271
SCRIPTS_DIR = os.path.dirname(__file__)
@@ -156,8 +155,6 @@ def get_modules():
156155
args = parser.parse_args()
157156
if args.packages is ALL_MODULES:
158157
result = list(MODULES)
159-
if sys.version_info[:2] != (2, 7):
160-
result.remove(BIGTABLE_API)
161158
else:
162159
result = []
163160
invalid = []
@@ -189,5 +186,6 @@ def main():
189186

190187
sys.exit(failed_modules)
191188

189+
192190
if __name__ == '__main__':
193191
main()

tox.ini

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,11 @@ covercmd =
1212
--cov-config {toxinidir}/.coveragerc \
1313
unit_tests
1414

15-
[grpc]
16-
deps =
17-
grpcio >= 1.0rc1
18-
google-gax >= 0.12.3, < 0.13dev
19-
gax-google-pubsub-v1 >= 0.8.0, < 0.9dev
20-
grpc-google-pubsub-v1 >= 0.8.0, < 0.9dev
21-
gax-google-logging-v2 >= 0.8.0, < 0.9dev
22-
grpc-google-logging-v2 >= 0.8.0, < 0.9dev
23-
2415
[testenv]
2516
commands =
2617
py.test {posargs} unit_tests
2718
deps =
2819
{[testing]deps}
29-
{[grpc]deps}
3020

3121
[testenv:py27-pandas]
3222
basepython =

0 commit comments

Comments
 (0)