Skip to content

Commit

Permalink
TST: build with google-cloud-bigquery at MASTER
Browse files Browse the repository at this point in the history
  • Loading branch information
tswast committed Mar 23, 2018
1 parent 0da267d commit 5f427a0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ install:
conda install -q numpy pytz python-dateutil;
PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com";
pip install --pre --upgrade --timeout=60 -f $PRE_WHEELS pandas;
pip install -e 'git+https://github.com/GoogleCloudPlatform/google-cloud-python.git#egg=version_subpkg&subdirectory=bigquery';
else
conda install -q pandas=$PANDAS;
fi
Expand Down
1 change: 0 additions & 1 deletion ci/requirements-3.6-MASTER.pip
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
google-auth
google-auth-oauthlib
mock
google-cloud-bigquery
19 changes: 8 additions & 11 deletions pandas_gbq/gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import time
import warnings
from datetime import datetime
from distutils.version import StrictVersion
from time import sleep

import numpy as np
Expand All @@ -21,17 +20,15 @@ def _check_google_client_version():
raise ImportError('Could not import pkg_resources (setuptools).')

# https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/bigquery/CHANGELOG.md
bigquery_client_minimum_version = '0.32.0'
bigquery_minimum_version = pkg_resources.parse_version('0.32.0.dev1')
bigquery_installed_version = pkg_resources.get_distribution(
'google-cloud-bigquery').parsed_version

_BIGQUERY_CLIENT_VERSION = pkg_resources.get_distribution(
'google-cloud-bigquery').version

if (StrictVersion(_BIGQUERY_CLIENT_VERSION) <
StrictVersion(bigquery_client_minimum_version)):
raise ImportError('pandas-gbq requires google-cloud-bigquery >= {0}, '
'current version {1}'
.format(bigquery_client_minimum_version,
_BIGQUERY_CLIENT_VERSION))
if bigquery_installed_version < bigquery_minimum_version:
raise ImportError(
'pandas-gbq requires google-cloud-bigquery >= {0}, '
'current version {1}'.format(
bigquery_minimum_version, bigquery_installed_version))


def _test_google_api_imports():
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def readme():


INSTALL_REQUIRES = [
'setuptools',
'pandas',
'google-auth>=1.0.0',
'google-auth-oauthlib>=0.0.1',
Expand Down

0 comments on commit 5f427a0

Please sign in to comment.