Skip to content

Commit 83d6c37

Browse files
authored
Add 'INSTALL_LIBRARY_FROM_SOURCE' to noxfile-template (GoogleCloudPlatform#3833)
This flag will only be used in client library repos.
1 parent 17aff26 commit 83d6c37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

noxfile-template.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def get_pytest_env_vars():
8888

8989
TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS])
9090

91+
INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False))
9192
#
9293
# Style Checks
9394
#
@@ -159,6 +160,9 @@ def _session_tests(session, post_install=None):
159160
if os.path.exists("requirements-test.txt"):
160161
session.install("-r", "requirements-test.txt")
161162

163+
if INSTALL_LIBRARY_FROM_SOURCE:
164+
session.install("-e", _get_repo_root())
165+
162166
if post_install:
163167
post_install(session)
164168

0 commit comments

Comments
 (0)