From ecd2ddd95d82ca139c69457809375ff68cb76eac Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 31 Oct 2018 15:49:46 -0400 Subject: [PATCH 1/2] Install local dependencies in-place. --- asset/noxfile.py | 7 +++++++ automl/noxfile.py | 19 +++++++++++++------ iot/noxfile.py | 9 +++++++++ kms/noxfile.py | 7 +++++++ oslogin/noxfile.py | 7 +++++++ tasks/noxfile.py | 7 +++++++ texttospeech/noxfile.py | 7 +++++++ videointelligence/noxfile.py | 7 +++++++ 8 files changed, 64 insertions(+), 6 deletions(-) diff --git a/asset/noxfile.py b/asset/noxfile.py index a3ed016336e6..f57d5d882d18 100644 --- a/asset/noxfile.py +++ b/asset/noxfile.py @@ -19,9 +19,16 @@ import nox + +LOCAL_DEPS = ( + os.path.join('..', 'api_core'), +) + def default(session): # Install all test dependencies, then install this package in-place. session.install('pytest') + for local_dep in LOCAL_DEPS: + session.install('-e', local_dep) session.install('-e', '.') # Run py.test against the unit tests. diff --git a/automl/noxfile.py b/automl/noxfile.py index 8277b35f8a35..139780a7c720 100644 --- a/automl/noxfile.py +++ b/automl/noxfile.py @@ -18,13 +18,20 @@ import nox -def default(session): - # Install all test dependencies, then install this package in-place. - session.install('pytest') - session.install('-e', '.') +LOCAL_DEPS = ( + os.path.join('..', 'api_core'), +) + - # Run py.test against the unit tests. - session.run('py.test', '--quiet', os.path.join('tests', 'unit')) +def default(session): + # Install all test dependencies, then install this package in-place. + session.install('pytest') + for local_dep in LOCAL_DEPS: + session.install('-e', local_dep) + session.install('-e', '.') + + # Run py.test against the unit tests. + session.run('py.test', '--quiet', os.path.join('tests', 'unit')) @nox.session(python=['2.7', '3.5', '3.6', '3.7']) diff --git a/iot/noxfile.py b/iot/noxfile.py index 2ce4269a0a93..9885a5fc6973 100644 --- a/iot/noxfile.py +++ b/iot/noxfile.py @@ -18,9 +18,16 @@ import nox +LOCAL_DEPS = ( + os.path.join('..', 'api_core'), +) + + def default(session): # Install all test dependencies, then install this package in-place. session.install('pytest') + for local_dep in LOCAL_DEPS: + session.install('-e', local_dep) session.install('-e', '.') # Run py.test against the unit tests. @@ -43,6 +50,8 @@ def system(session): # Install all test dependencies, then install this package in-place. session.install('pytest') + for local_dep in LOCAL_DEPS: + session.install('-e', local_dep) session.install('-e', '.') # Run py.test against the unit tests. diff --git a/kms/noxfile.py b/kms/noxfile.py index 6f269e97eb5e..91e7f5d4d8f7 100644 --- a/kms/noxfile.py +++ b/kms/noxfile.py @@ -20,9 +20,16 @@ import nox +LOCAL_DEPS = ( + os.path.join('..', 'api_core'), +) + + def default(session): # Install all test dependencies, then install this package in-place. session.install('pytest') + for local_dep in LOCAL_DEPS: + session.install('-e', local_dep) session.install('-e', '.') # Run py.test against the unit tests. diff --git a/oslogin/noxfile.py b/oslogin/noxfile.py index 1b66d8b23018..139780a7c720 100644 --- a/oslogin/noxfile.py +++ b/oslogin/noxfile.py @@ -18,9 +18,16 @@ import nox +LOCAL_DEPS = ( + os.path.join('..', 'api_core'), +) + + def default(session): # Install all test dependencies, then install this package in-place. session.install('pytest') + for local_dep in LOCAL_DEPS: + session.install('-e', local_dep) session.install('-e', '.') # Run py.test against the unit tests. diff --git a/tasks/noxfile.py b/tasks/noxfile.py index 923322a74128..4923d0eefef2 100644 --- a/tasks/noxfile.py +++ b/tasks/noxfile.py @@ -20,9 +20,16 @@ import nox +LOCAL_DEPS = ( + os.path.join('..', 'api_core'), +) + + def default(session): # Install all test dependencies, then install this package in-place. session.install('pytest') + for local_dep in LOCAL_DEPS: + session.install('-e', local_dep) session.install('-e', '.') # Run py.test against the unit tests. diff --git a/texttospeech/noxfile.py b/texttospeech/noxfile.py index e0719dff7a85..b15002806ae1 100644 --- a/texttospeech/noxfile.py +++ b/texttospeech/noxfile.py @@ -17,9 +17,16 @@ import nox + +LOCAL_DEPS = ( + os.path.join('..', 'api_core'), +) + def default(session): # Install all test dependencies, then install this package in-place. session.install('pytest') + for local_dep in LOCAL_DEPS: + session.install('-e', local_dep) session.install('-e', '.') # Run py.test against the unit tests. diff --git a/videointelligence/noxfile.py b/videointelligence/noxfile.py index 138a0a07f6a5..9cf8542ce131 100644 --- a/videointelligence/noxfile.py +++ b/videointelligence/noxfile.py @@ -18,9 +18,16 @@ import nox +LOCAL_DEPS = ( + os.path.join('..', 'api_core'), +) + + def default(session): # Install all test dependencies, then install this package in-place. session.install('pytest') + for local_dep in LOCAL_DEPS: + session.install('-e', local_dep) session.install('-e', '.') # Run py.test against the unit tests. From 0fb375c46ba03642770cc286789ff7c0748f59be Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 31 Oct 2018 15:50:16 -0400 Subject: [PATCH 2/2] Avoid broken 'googleapis-common-protos 1.5.4' release. --- api_core/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api_core/setup.py b/api_core/setup.py index fdff7c34d92a..4fc19204e435 100644 --- a/api_core/setup.py +++ b/api_core/setup.py @@ -29,7 +29,7 @@ # 'Development Status :: 5 - Production/Stable' release_status = 'Development Status :: 5 - Production/Stable' dependencies = [ - 'googleapis-common-protos<2.0dev,>=1.5.3', + 'googleapis-common-protos<2.0dev,>=1.5.3,!=1.5.4', 'protobuf>=3.4.0', 'google-auth<2.0.0dev,>=0.4.0', 'requests<3.0.0dev,>=2.18.0',