From 022b16a336b6219c01f7e401d54462718952ce54 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Mon, 11 May 2026 20:41:34 +0000 Subject: [PATCH 1/5] chore(templates): resolve core dependencies from local sibling paths in nox --- .../gapic/templates/noxfile.py.j2 | 21 +++++++++++-------- .../integration/goldens/asset/noxfile.py | 21 +++++++++++-------- .../goldens/credentials/noxfile.py | 21 +++++++++++-------- .../integration/goldens/eventarc/noxfile.py | 21 +++++++++++-------- .../integration/goldens/logging/noxfile.py | 21 +++++++++++-------- .../goldens/logging_internal/noxfile.py | 21 +++++++++++-------- .../integration/goldens/redis/noxfile.py | 21 +++++++++++-------- .../goldens/redis_selective/noxfile.py | 21 +++++++++++-------- .../goldens/storagebatchoperations/noxfile.py | 21 +++++++++++-------- 9 files changed, 108 insertions(+), 81 deletions(-) diff --git a/packages/gapic-generator/gapic/templates/noxfile.py.j2 b/packages/gapic-generator/gapic/templates/noxfile.py.j2 index 244173b4b42d..d91d0a27326e 100644 --- a/packages/gapic-generator/gapic/templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/templates/noxfile.py.j2 @@ -595,17 +595,20 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core", - "google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/google-cloud-python#egg=proto-plus&subdirectory=packages/proto-plus", + core_packages = [ + "googleapis-common-protos", + "google-api-core", + "google-auth", + "grpc-google-iam-v1", + "proto-plus", ] - for dep in core_dependencies_from_source: - session.install(dep, "--no-deps", "--ignore-installed") - print(f"Installed {dep}") + packages_dir = CURRENT_DIRECTORY.parent + + for pkg in core_packages: + pkg_path = str(packages_dir / pkg) + session.install(pkg_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {pkg_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py index 654c242376b8..dc07432ce17e 100755 --- a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py @@ -587,17 +587,20 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core", - "google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/google-cloud-python#egg=proto-plus&subdirectory=packages/proto-plus", + core_packages = [ + "googleapis-common-protos", + "google-api-core", + "google-auth", + "grpc-google-iam-v1", + "proto-plus", ] - for dep in core_dependencies_from_source: - session.install(dep, "--no-deps", "--ignore-installed") - print(f"Installed {dep}") + packages_dir = CURRENT_DIRECTORY.parent + + for pkg in core_packages: + pkg_path = str(packages_dir / pkg) + session.install(pkg_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {pkg_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py index 6d4d59fd617e..945139beea56 100755 --- a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py @@ -587,17 +587,20 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core", - "google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/google-cloud-python#egg=proto-plus&subdirectory=packages/proto-plus", + core_packages = [ + "googleapis-common-protos", + "google-api-core", + "google-auth", + "grpc-google-iam-v1", + "proto-plus", ] - for dep in core_dependencies_from_source: - session.install(dep, "--no-deps", "--ignore-installed") - print(f"Installed {dep}") + packages_dir = CURRENT_DIRECTORY.parent + + for pkg in core_packages: + pkg_path = str(packages_dir / pkg) + session.install(pkg_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {pkg_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py index 37e78b41e841..975f8a92d378 100755 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py @@ -587,17 +587,20 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core", - "google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/google-cloud-python#egg=proto-plus&subdirectory=packages/proto-plus", + core_packages = [ + "googleapis-common-protos", + "google-api-core", + "google-auth", + "grpc-google-iam-v1", + "proto-plus", ] - for dep in core_dependencies_from_source: - session.install(dep, "--no-deps", "--ignore-installed") - print(f"Installed {dep}") + packages_dir = CURRENT_DIRECTORY.parent + + for pkg in core_packages: + pkg_path = str(packages_dir / pkg) + session.install(pkg_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {pkg_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py index 4f061e71824c..87cb5c564904 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py @@ -587,17 +587,20 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core", - "google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/google-cloud-python#egg=proto-plus&subdirectory=packages/proto-plus", + core_packages = [ + "googleapis-common-protos", + "google-api-core", + "google-auth", + "grpc-google-iam-v1", + "proto-plus", ] - for dep in core_dependencies_from_source: - session.install(dep, "--no-deps", "--ignore-installed") - print(f"Installed {dep}") + packages_dir = CURRENT_DIRECTORY.parent + + for pkg in core_packages: + pkg_path = str(packages_dir / pkg) + session.install(pkg_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {pkg_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py index 4f061e71824c..87cb5c564904 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py @@ -587,17 +587,20 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core", - "google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/google-cloud-python#egg=proto-plus&subdirectory=packages/proto-plus", + core_packages = [ + "googleapis-common-protos", + "google-api-core", + "google-auth", + "grpc-google-iam-v1", + "proto-plus", ] - for dep in core_dependencies_from_source: - session.install(dep, "--no-deps", "--ignore-installed") - print(f"Installed {dep}") + packages_dir = CURRENT_DIRECTORY.parent + + for pkg in core_packages: + pkg_path = str(packages_dir / pkg) + session.install(pkg_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {pkg_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py index c224715196d7..8a46ecd76885 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py @@ -587,17 +587,20 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core", - "google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/google-cloud-python#egg=proto-plus&subdirectory=packages/proto-plus", + core_packages = [ + "googleapis-common-protos", + "google-api-core", + "google-auth", + "grpc-google-iam-v1", + "proto-plus", ] - for dep in core_dependencies_from_source: - session.install(dep, "--no-deps", "--ignore-installed") - print(f"Installed {dep}") + packages_dir = CURRENT_DIRECTORY.parent + + for pkg in core_packages: + pkg_path = str(packages_dir / pkg) + session.install(pkg_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {pkg_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py index c224715196d7..8a46ecd76885 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py @@ -587,17 +587,20 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core", - "google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/google-cloud-python#egg=proto-plus&subdirectory=packages/proto-plus", + core_packages = [ + "googleapis-common-protos", + "google-api-core", + "google-auth", + "grpc-google-iam-v1", + "proto-plus", ] - for dep in core_dependencies_from_source: - session.install(dep, "--no-deps", "--ignore-installed") - print(f"Installed {dep}") + packages_dir = CURRENT_DIRECTORY.parent + + for pkg in core_packages: + pkg_path = str(packages_dir / pkg) + session.install(pkg_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {pkg_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py index 02371d0616c5..e3f89193de70 100755 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py @@ -587,17 +587,20 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core", - "google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/google-cloud-python#egg=proto-plus&subdirectory=packages/proto-plus", + core_packages = [ + "googleapis-common-protos", + "google-api-core", + "google-auth", + "grpc-google-iam-v1", + "proto-plus", ] - for dep in core_dependencies_from_source: - session.install(dep, "--no-deps", "--ignore-installed") - print(f"Installed {dep}") + packages_dir = CURRENT_DIRECTORY.parent + + for pkg in core_packages: + pkg_path = str(packages_dir / pkg) + session.install(pkg_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {pkg_path}") session.run( "py.test", From 5b1ea6f2645b717283fe48bc70d7ad58bf4b75e0 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Mon, 11 May 2026 21:22:04 +0000 Subject: [PATCH 2/5] address feedback --- .../gapic-generator/gapic/templates/noxfile.py.j2 | 14 ++++++++------ .../tests/integration/goldens/asset/noxfile.py | 14 ++++++++------ .../integration/goldens/credentials/noxfile.py | 14 ++++++++------ .../tests/integration/goldens/eventarc/noxfile.py | 14 ++++++++------ .../tests/integration/goldens/logging/noxfile.py | 14 ++++++++------ .../goldens/logging_internal/noxfile.py | 14 ++++++++------ .../tests/integration/goldens/redis/noxfile.py | 14 ++++++++------ .../integration/goldens/redis_selective/noxfile.py | 14 ++++++++------ .../goldens/storagebatchoperations/noxfile.py | 14 ++++++++------ 9 files changed, 72 insertions(+), 54 deletions(-) diff --git a/packages/gapic-generator/gapic/templates/noxfile.py.j2 b/packages/gapic-generator/gapic/templates/noxfile.py.j2 index d91d0a27326e..69bbd231b412 100644 --- a/packages/gapic-generator/gapic/templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/templates/noxfile.py.j2 @@ -595,7 +595,7 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_packages = [ + core_dependencies_from_source = [ "googleapis-common-protos", "google-api-core", "google-auth", @@ -603,12 +603,14 @@ def core_deps_from_source(session, protobuf_implementation): "proto-plus", ] - packages_dir = CURRENT_DIRECTORY.parent + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent - for pkg in core_packages: - pkg_path = str(packages_dir / pkg) - session.install(pkg_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {pkg_path}") + for dep in core_dependencies_from_source: + dep_path = str(deps_dir / dep) + session.install(dep_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py index dc07432ce17e..7db689f9ba23 100755 --- a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py @@ -587,7 +587,7 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_packages = [ + core_dependencies_from_source = [ "googleapis-common-protos", "google-api-core", "google-auth", @@ -595,12 +595,14 @@ def core_deps_from_source(session, protobuf_implementation): "proto-plus", ] - packages_dir = CURRENT_DIRECTORY.parent + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent - for pkg in core_packages: - pkg_path = str(packages_dir / pkg) - session.install(pkg_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {pkg_path}") + for dep in core_dependencies_from_source: + dep_path = str(deps_dir / dep) + session.install(dep_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py index 945139beea56..83ef6c761fd2 100755 --- a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py @@ -587,7 +587,7 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_packages = [ + core_dependencies_from_source = [ "googleapis-common-protos", "google-api-core", "google-auth", @@ -595,12 +595,14 @@ def core_deps_from_source(session, protobuf_implementation): "proto-plus", ] - packages_dir = CURRENT_DIRECTORY.parent + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent - for pkg in core_packages: - pkg_path = str(packages_dir / pkg) - session.install(pkg_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {pkg_path}") + for dep in core_dependencies_from_source: + dep_path = str(deps_dir / dep) + session.install(dep_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py index 975f8a92d378..8f58b2ad98e2 100755 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py @@ -587,7 +587,7 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_packages = [ + core_dependencies_from_source = [ "googleapis-common-protos", "google-api-core", "google-auth", @@ -595,12 +595,14 @@ def core_deps_from_source(session, protobuf_implementation): "proto-plus", ] - packages_dir = CURRENT_DIRECTORY.parent + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent - for pkg in core_packages: - pkg_path = str(packages_dir / pkg) - session.install(pkg_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {pkg_path}") + for dep in core_dependencies_from_source: + dep_path = str(deps_dir / dep) + session.install(dep_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py index 87cb5c564904..5895d649cd92 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py @@ -587,7 +587,7 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_packages = [ + core_dependencies_from_source = [ "googleapis-common-protos", "google-api-core", "google-auth", @@ -595,12 +595,14 @@ def core_deps_from_source(session, protobuf_implementation): "proto-plus", ] - packages_dir = CURRENT_DIRECTORY.parent + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent - for pkg in core_packages: - pkg_path = str(packages_dir / pkg) - session.install(pkg_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {pkg_path}") + for dep in core_dependencies_from_source: + dep_path = str(deps_dir / dep) + session.install(dep_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py index 87cb5c564904..5895d649cd92 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py @@ -587,7 +587,7 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_packages = [ + core_dependencies_from_source = [ "googleapis-common-protos", "google-api-core", "google-auth", @@ -595,12 +595,14 @@ def core_deps_from_source(session, protobuf_implementation): "proto-plus", ] - packages_dir = CURRENT_DIRECTORY.parent + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent - for pkg in core_packages: - pkg_path = str(packages_dir / pkg) - session.install(pkg_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {pkg_path}") + for dep in core_dependencies_from_source: + dep_path = str(deps_dir / dep) + session.install(dep_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py index 8a46ecd76885..9d200879f02c 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py @@ -587,7 +587,7 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_packages = [ + core_dependencies_from_source = [ "googleapis-common-protos", "google-api-core", "google-auth", @@ -595,12 +595,14 @@ def core_deps_from_source(session, protobuf_implementation): "proto-plus", ] - packages_dir = CURRENT_DIRECTORY.parent + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent - for pkg in core_packages: - pkg_path = str(packages_dir / pkg) - session.install(pkg_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {pkg_path}") + for dep in core_dependencies_from_source: + dep_path = str(deps_dir / dep) + session.install(dep_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py index 8a46ecd76885..9d200879f02c 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py @@ -587,7 +587,7 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_packages = [ + core_dependencies_from_source = [ "googleapis-common-protos", "google-api-core", "google-auth", @@ -595,12 +595,14 @@ def core_deps_from_source(session, protobuf_implementation): "proto-plus", ] - packages_dir = CURRENT_DIRECTORY.parent + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent - for pkg in core_packages: - pkg_path = str(packages_dir / pkg) - session.install(pkg_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {pkg_path}") + for dep in core_dependencies_from_source: + dep_path = str(deps_dir / dep) + session.install(dep_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py index e3f89193de70..d293535bb40b 100755 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py @@ -587,7 +587,7 @@ def core_deps_from_source(session, protobuf_implementation): # added to the list below so that it is installed from source, rather than PyPI # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. - core_packages = [ + core_dependencies_from_source = [ "googleapis-common-protos", "google-api-core", "google-auth", @@ -595,12 +595,14 @@ def core_deps_from_source(session, protobuf_implementation): "proto-plus", ] - packages_dir = CURRENT_DIRECTORY.parent + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent - for pkg in core_packages: - pkg_path = str(packages_dir / pkg) - session.install(pkg_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {pkg_path}") + for dep in core_dependencies_from_source: + dep_path = str(deps_dir / dep) + session.install(dep_path, "--no-deps", "--ignore-installed") + print(f"Installed {pkg} locally from {dep_path}") session.run( "py.test", From c5f7b86d468a536635a6f75838aa97dacc621794 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Mon, 11 May 2026 21:31:15 +0000 Subject: [PATCH 3/5] fix typo --- packages/gapic-generator/gapic/templates/noxfile.py.j2 | 2 +- .../gapic-generator/tests/integration/goldens/asset/noxfile.py | 2 +- .../tests/integration/goldens/credentials/noxfile.py | 2 +- .../tests/integration/goldens/eventarc/noxfile.py | 2 +- .../tests/integration/goldens/logging/noxfile.py | 2 +- .../tests/integration/goldens/logging_internal/noxfile.py | 2 +- .../gapic-generator/tests/integration/goldens/redis/noxfile.py | 2 +- .../tests/integration/goldens/redis_selective/noxfile.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/gapic-generator/gapic/templates/noxfile.py.j2 b/packages/gapic-generator/gapic/templates/noxfile.py.j2 index 69bbd231b412..5f0d04d964c5 100644 --- a/packages/gapic-generator/gapic/templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/templates/noxfile.py.j2 @@ -610,7 +610,7 @@ def core_deps_from_source(session, protobuf_implementation): for dep in core_dependencies_from_source: dep_path = str(deps_dir / dep) session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {dep_path}") + print(f"Installed {dep} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py index 7db689f9ba23..33893fd5cd99 100755 --- a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py @@ -602,7 +602,7 @@ def core_deps_from_source(session, protobuf_implementation): for dep in core_dependencies_from_source: dep_path = str(deps_dir / dep) session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {dep_path}") + print(f"Installed {dep} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py index 83ef6c761fd2..983357fdf108 100755 --- a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py @@ -602,7 +602,7 @@ def core_deps_from_source(session, protobuf_implementation): for dep in core_dependencies_from_source: dep_path = str(deps_dir / dep) session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {dep_path}") + print(f"Installed {dep} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py index 8f58b2ad98e2..ce0c4a63704e 100755 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py @@ -602,7 +602,7 @@ def core_deps_from_source(session, protobuf_implementation): for dep in core_dependencies_from_source: dep_path = str(deps_dir / dep) session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {dep_path}") + print(f"Installed {dep} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py index 5895d649cd92..a8952c483fc3 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py @@ -602,7 +602,7 @@ def core_deps_from_source(session, protobuf_implementation): for dep in core_dependencies_from_source: dep_path = str(deps_dir / dep) session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {dep_path}") + print(f"Installed {dep} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py index 5895d649cd92..a8952c483fc3 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py @@ -602,7 +602,7 @@ def core_deps_from_source(session, protobuf_implementation): for dep in core_dependencies_from_source: dep_path = str(deps_dir / dep) session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {dep_path}") + print(f"Installed {dep} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py index 9d200879f02c..5118819f50d5 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py @@ -602,7 +602,7 @@ def core_deps_from_source(session, protobuf_implementation): for dep in core_dependencies_from_source: dep_path = str(deps_dir / dep) session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {dep_path}") + print(f"Installed {dep} locally from {dep_path}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py index 9d200879f02c..5118819f50d5 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py @@ -602,7 +602,7 @@ def core_deps_from_source(session, protobuf_implementation): for dep in core_dependencies_from_source: dep_path = str(deps_dir / dep) session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {dep_path}") + print(f"Installed {dep} locally from {dep_path}") session.run( "py.test", From 580a5d7d828665e15b0a216259e8f6172519fc46 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Mon, 11 May 2026 21:43:55 +0000 Subject: [PATCH 4/5] update storagebatchoperations --- .../tests/integration/goldens/storagebatchoperations/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py index d293535bb40b..a4c6c5ea276d 100755 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py @@ -602,7 +602,7 @@ def core_deps_from_source(session, protobuf_implementation): for dep in core_dependencies_from_source: dep_path = str(deps_dir / dep) session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {pkg} locally from {dep_path}") + print(f"Installed {dep} locally from {dep_path}") session.run( "py.test", From 51f1ff2381b1f62c9380b95f387914b03b0a56d0 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Mon, 11 May 2026 23:17:27 +0000 Subject: [PATCH 5/5] update prerelease_deps and batch installation --- .../gapic/templates/noxfile.py.j2 | 68 +++++++++++++------ .../integration/goldens/asset/noxfile.py | 68 +++++++++++++------ .../goldens/credentials/noxfile.py | 68 +++++++++++++------ .../integration/goldens/eventarc/noxfile.py | 68 +++++++++++++------ .../integration/goldens/logging/noxfile.py | 68 +++++++++++++------ .../goldens/logging_internal/noxfile.py | 68 +++++++++++++------ .../integration/goldens/redis/noxfile.py | 68 +++++++++++++------ .../goldens/redis_selective/noxfile.py | 68 +++++++++++++------ .../goldens/storagebatchoperations/noxfile.py | 68 +++++++++++++------ 9 files changed, 432 insertions(+), 180 deletions(-) diff --git a/packages/gapic-generator/gapic/templates/noxfile.py.j2 b/packages/gapic-generator/gapic/templates/noxfile.py.j2 index 5f0d04d964c5..db4a29fcf9db 100644 --- a/packages/gapic-generator/gapic/templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/templates/noxfile.py.j2 @@ -509,24 +509,51 @@ def prerelease_deps(session, protobuf_implementation): "proto-plus", ] - for dep in prerel_deps: - session.install("--pre", "--no-deps", "--ignore-installed", dep) - # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` - # to the dictionary below once this bug is fixed. - # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add - # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below - # once this bug is fixed. - package_namespaces = { - "google-api-core": "google.api_core", - "google-auth": "google.auth", - "grpcio": "grpc", - "protobuf": "google.protobuf", - "proto-plus": "proto", - } - - version_namespace = package_namespaces.get(dep) + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent + + # Extract the base package name, safely ignoring version bounds and spaces + # (e.g., "grpcio>=1.75.1" becomes "grpcio") + parsed_deps = { + dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) + for dep in prerel_deps + } + # Dynamically sort local packages vs PyPI dependencies + local_paths = [] + pypi_deps = [] + + for dep, pkg_name in parsed_deps.items(): + if (deps_dir / pkg_name).exists(): + local_paths.append(str(deps_dir / pkg_name)) + else: + pypi_deps.append(dep) + + # Batch pip installations to avoid sequential overhead + if local_paths: + session.install(*local_paths, "--no-deps", "--ignore-installed") + if pypi_deps: + session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed") + + # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` + # to the dictionary below once this bug is fixed. + # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add + # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below + # once this bug is fixed. + package_namespaces = { + "google-api-core": "google.api_core", + "google-auth": "google.auth", + "grpcio": "grpc", + "protobuf": "google.protobuf", + "proto-plus": "proto", + } + + # Reuse the parsed names for logging and version verification + for dep, pkg_name in parsed_deps.items(): print(f"Installed {dep}") + version_namespace = package_namespaces.get(pkg_name) + if version_namespace: session.run( "python", @@ -607,10 +634,11 @@ def core_deps_from_source(session, protobuf_implementation): while deps_dir.name != "packages" and deps_dir.parent != deps_dir: deps_dir = deps_dir.parent - for dep in core_dependencies_from_source: - dep_path = str(deps_dir / dep) - session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {dep} locally from {dep_path}") + # Batch the pip installation to avoid sequential overhead + dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] + + session.install(*dep_paths, "--no-deps", "--ignore-installed") + print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py index 33893fd5cd99..9abef9c30d27 100755 --- a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py @@ -501,24 +501,51 @@ def prerelease_deps(session, protobuf_implementation): "proto-plus", ] - for dep in prerel_deps: - session.install("--pre", "--no-deps", "--ignore-installed", dep) - # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` - # to the dictionary below once this bug is fixed. - # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add - # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below - # once this bug is fixed. - package_namespaces = { - "google-api-core": "google.api_core", - "google-auth": "google.auth", - "grpcio": "grpc", - "protobuf": "google.protobuf", - "proto-plus": "proto", - } - - version_namespace = package_namespaces.get(dep) + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent + # Extract the base package name, safely ignoring version bounds and spaces + # (e.g., "grpcio>=1.75.1" becomes "grpcio") + parsed_deps = { + dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) + for dep in prerel_deps + } + + # Dynamically sort local packages vs PyPI dependencies + local_paths = [] + pypi_deps = [] + + for dep, pkg_name in parsed_deps.items(): + if (deps_dir / pkg_name).exists(): + local_paths.append(str(deps_dir / pkg_name)) + else: + pypi_deps.append(dep) + + # Batch pip installations to avoid sequential overhead + if local_paths: + session.install(*local_paths, "--no-deps", "--ignore-installed") + if pypi_deps: + session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed") + + # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` + # to the dictionary below once this bug is fixed. + # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add + # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below + # once this bug is fixed. + package_namespaces = { + "google-api-core": "google.api_core", + "google-auth": "google.auth", + "grpcio": "grpc", + "protobuf": "google.protobuf", + "proto-plus": "proto", + } + + # Reuse the parsed names for logging and version verification + for dep, pkg_name in parsed_deps.items(): print(f"Installed {dep}") + version_namespace = package_namespaces.get(pkg_name) + if version_namespace: session.run( "python", @@ -599,10 +626,11 @@ def core_deps_from_source(session, protobuf_implementation): while deps_dir.name != "packages" and deps_dir.parent != deps_dir: deps_dir = deps_dir.parent - for dep in core_dependencies_from_source: - dep_path = str(deps_dir / dep) - session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {dep} locally from {dep_path}") + # Batch the pip installation to avoid sequential overhead + dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] + + session.install(*dep_paths, "--no-deps", "--ignore-installed") + print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py index 983357fdf108..bfa0326f3845 100755 --- a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py @@ -501,24 +501,51 @@ def prerelease_deps(session, protobuf_implementation): "proto-plus", ] - for dep in prerel_deps: - session.install("--pre", "--no-deps", "--ignore-installed", dep) - # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` - # to the dictionary below once this bug is fixed. - # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add - # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below - # once this bug is fixed. - package_namespaces = { - "google-api-core": "google.api_core", - "google-auth": "google.auth", - "grpcio": "grpc", - "protobuf": "google.protobuf", - "proto-plus": "proto", - } - - version_namespace = package_namespaces.get(dep) + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent + # Extract the base package name, safely ignoring version bounds and spaces + # (e.g., "grpcio>=1.75.1" becomes "grpcio") + parsed_deps = { + dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) + for dep in prerel_deps + } + + # Dynamically sort local packages vs PyPI dependencies + local_paths = [] + pypi_deps = [] + + for dep, pkg_name in parsed_deps.items(): + if (deps_dir / pkg_name).exists(): + local_paths.append(str(deps_dir / pkg_name)) + else: + pypi_deps.append(dep) + + # Batch pip installations to avoid sequential overhead + if local_paths: + session.install(*local_paths, "--no-deps", "--ignore-installed") + if pypi_deps: + session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed") + + # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` + # to the dictionary below once this bug is fixed. + # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add + # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below + # once this bug is fixed. + package_namespaces = { + "google-api-core": "google.api_core", + "google-auth": "google.auth", + "grpcio": "grpc", + "protobuf": "google.protobuf", + "proto-plus": "proto", + } + + # Reuse the parsed names for logging and version verification + for dep, pkg_name in parsed_deps.items(): print(f"Installed {dep}") + version_namespace = package_namespaces.get(pkg_name) + if version_namespace: session.run( "python", @@ -599,10 +626,11 @@ def core_deps_from_source(session, protobuf_implementation): while deps_dir.name != "packages" and deps_dir.parent != deps_dir: deps_dir = deps_dir.parent - for dep in core_dependencies_from_source: - dep_path = str(deps_dir / dep) - session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {dep} locally from {dep_path}") + # Batch the pip installation to avoid sequential overhead + dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] + + session.install(*dep_paths, "--no-deps", "--ignore-installed") + print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py index ce0c4a63704e..18dbb71ca4ee 100755 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py @@ -501,24 +501,51 @@ def prerelease_deps(session, protobuf_implementation): "proto-plus", ] - for dep in prerel_deps: - session.install("--pre", "--no-deps", "--ignore-installed", dep) - # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` - # to the dictionary below once this bug is fixed. - # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add - # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below - # once this bug is fixed. - package_namespaces = { - "google-api-core": "google.api_core", - "google-auth": "google.auth", - "grpcio": "grpc", - "protobuf": "google.protobuf", - "proto-plus": "proto", - } - - version_namespace = package_namespaces.get(dep) + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent + # Extract the base package name, safely ignoring version bounds and spaces + # (e.g., "grpcio>=1.75.1" becomes "grpcio") + parsed_deps = { + dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) + for dep in prerel_deps + } + + # Dynamically sort local packages vs PyPI dependencies + local_paths = [] + pypi_deps = [] + + for dep, pkg_name in parsed_deps.items(): + if (deps_dir / pkg_name).exists(): + local_paths.append(str(deps_dir / pkg_name)) + else: + pypi_deps.append(dep) + + # Batch pip installations to avoid sequential overhead + if local_paths: + session.install(*local_paths, "--no-deps", "--ignore-installed") + if pypi_deps: + session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed") + + # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` + # to the dictionary below once this bug is fixed. + # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add + # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below + # once this bug is fixed. + package_namespaces = { + "google-api-core": "google.api_core", + "google-auth": "google.auth", + "grpcio": "grpc", + "protobuf": "google.protobuf", + "proto-plus": "proto", + } + + # Reuse the parsed names for logging and version verification + for dep, pkg_name in parsed_deps.items(): print(f"Installed {dep}") + version_namespace = package_namespaces.get(pkg_name) + if version_namespace: session.run( "python", @@ -599,10 +626,11 @@ def core_deps_from_source(session, protobuf_implementation): while deps_dir.name != "packages" and deps_dir.parent != deps_dir: deps_dir = deps_dir.parent - for dep in core_dependencies_from_source: - dep_path = str(deps_dir / dep) - session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {dep} locally from {dep_path}") + # Batch the pip installation to avoid sequential overhead + dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] + + session.install(*dep_paths, "--no-deps", "--ignore-installed") + print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py index a8952c483fc3..f7e6f9091aaf 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py @@ -501,24 +501,51 @@ def prerelease_deps(session, protobuf_implementation): "proto-plus", ] - for dep in prerel_deps: - session.install("--pre", "--no-deps", "--ignore-installed", dep) - # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` - # to the dictionary below once this bug is fixed. - # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add - # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below - # once this bug is fixed. - package_namespaces = { - "google-api-core": "google.api_core", - "google-auth": "google.auth", - "grpcio": "grpc", - "protobuf": "google.protobuf", - "proto-plus": "proto", - } - - version_namespace = package_namespaces.get(dep) + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent + # Extract the base package name, safely ignoring version bounds and spaces + # (e.g., "grpcio>=1.75.1" becomes "grpcio") + parsed_deps = { + dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) + for dep in prerel_deps + } + + # Dynamically sort local packages vs PyPI dependencies + local_paths = [] + pypi_deps = [] + + for dep, pkg_name in parsed_deps.items(): + if (deps_dir / pkg_name).exists(): + local_paths.append(str(deps_dir / pkg_name)) + else: + pypi_deps.append(dep) + + # Batch pip installations to avoid sequential overhead + if local_paths: + session.install(*local_paths, "--no-deps", "--ignore-installed") + if pypi_deps: + session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed") + + # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` + # to the dictionary below once this bug is fixed. + # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add + # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below + # once this bug is fixed. + package_namespaces = { + "google-api-core": "google.api_core", + "google-auth": "google.auth", + "grpcio": "grpc", + "protobuf": "google.protobuf", + "proto-plus": "proto", + } + + # Reuse the parsed names for logging and version verification + for dep, pkg_name in parsed_deps.items(): print(f"Installed {dep}") + version_namespace = package_namespaces.get(pkg_name) + if version_namespace: session.run( "python", @@ -599,10 +626,11 @@ def core_deps_from_source(session, protobuf_implementation): while deps_dir.name != "packages" and deps_dir.parent != deps_dir: deps_dir = deps_dir.parent - for dep in core_dependencies_from_source: - dep_path = str(deps_dir / dep) - session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {dep} locally from {dep_path}") + # Batch the pip installation to avoid sequential overhead + dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] + + session.install(*dep_paths, "--no-deps", "--ignore-installed") + print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py index a8952c483fc3..f7e6f9091aaf 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py @@ -501,24 +501,51 @@ def prerelease_deps(session, protobuf_implementation): "proto-plus", ] - for dep in prerel_deps: - session.install("--pre", "--no-deps", "--ignore-installed", dep) - # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` - # to the dictionary below once this bug is fixed. - # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add - # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below - # once this bug is fixed. - package_namespaces = { - "google-api-core": "google.api_core", - "google-auth": "google.auth", - "grpcio": "grpc", - "protobuf": "google.protobuf", - "proto-plus": "proto", - } - - version_namespace = package_namespaces.get(dep) + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent + # Extract the base package name, safely ignoring version bounds and spaces + # (e.g., "grpcio>=1.75.1" becomes "grpcio") + parsed_deps = { + dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) + for dep in prerel_deps + } + + # Dynamically sort local packages vs PyPI dependencies + local_paths = [] + pypi_deps = [] + + for dep, pkg_name in parsed_deps.items(): + if (deps_dir / pkg_name).exists(): + local_paths.append(str(deps_dir / pkg_name)) + else: + pypi_deps.append(dep) + + # Batch pip installations to avoid sequential overhead + if local_paths: + session.install(*local_paths, "--no-deps", "--ignore-installed") + if pypi_deps: + session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed") + + # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` + # to the dictionary below once this bug is fixed. + # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add + # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below + # once this bug is fixed. + package_namespaces = { + "google-api-core": "google.api_core", + "google-auth": "google.auth", + "grpcio": "grpc", + "protobuf": "google.protobuf", + "proto-plus": "proto", + } + + # Reuse the parsed names for logging and version verification + for dep, pkg_name in parsed_deps.items(): print(f"Installed {dep}") + version_namespace = package_namespaces.get(pkg_name) + if version_namespace: session.run( "python", @@ -599,10 +626,11 @@ def core_deps_from_source(session, protobuf_implementation): while deps_dir.name != "packages" and deps_dir.parent != deps_dir: deps_dir = deps_dir.parent - for dep in core_dependencies_from_source: - dep_path = str(deps_dir / dep) - session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {dep} locally from {dep_path}") + # Batch the pip installation to avoid sequential overhead + dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] + + session.install(*dep_paths, "--no-deps", "--ignore-installed") + print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py index 5118819f50d5..05e6e98292a4 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py @@ -501,24 +501,51 @@ def prerelease_deps(session, protobuf_implementation): "proto-plus", ] - for dep in prerel_deps: - session.install("--pre", "--no-deps", "--ignore-installed", dep) - # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` - # to the dictionary below once this bug is fixed. - # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add - # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below - # once this bug is fixed. - package_namespaces = { - "google-api-core": "google.api_core", - "google-auth": "google.auth", - "grpcio": "grpc", - "protobuf": "google.protobuf", - "proto-plus": "proto", - } - - version_namespace = package_namespaces.get(dep) + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent + # Extract the base package name, safely ignoring version bounds and spaces + # (e.g., "grpcio>=1.75.1" becomes "grpcio") + parsed_deps = { + dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) + for dep in prerel_deps + } + + # Dynamically sort local packages vs PyPI dependencies + local_paths = [] + pypi_deps = [] + + for dep, pkg_name in parsed_deps.items(): + if (deps_dir / pkg_name).exists(): + local_paths.append(str(deps_dir / pkg_name)) + else: + pypi_deps.append(dep) + + # Batch pip installations to avoid sequential overhead + if local_paths: + session.install(*local_paths, "--no-deps", "--ignore-installed") + if pypi_deps: + session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed") + + # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` + # to the dictionary below once this bug is fixed. + # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add + # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below + # once this bug is fixed. + package_namespaces = { + "google-api-core": "google.api_core", + "google-auth": "google.auth", + "grpcio": "grpc", + "protobuf": "google.protobuf", + "proto-plus": "proto", + } + + # Reuse the parsed names for logging and version verification + for dep, pkg_name in parsed_deps.items(): print(f"Installed {dep}") + version_namespace = package_namespaces.get(pkg_name) + if version_namespace: session.run( "python", @@ -599,10 +626,11 @@ def core_deps_from_source(session, protobuf_implementation): while deps_dir.name != "packages" and deps_dir.parent != deps_dir: deps_dir = deps_dir.parent - for dep in core_dependencies_from_source: - dep_path = str(deps_dir / dep) - session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {dep} locally from {dep_path}") + # Batch the pip installation to avoid sequential overhead + dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] + + session.install(*dep_paths, "--no-deps", "--ignore-installed") + print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py index 5118819f50d5..05e6e98292a4 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py @@ -501,24 +501,51 @@ def prerelease_deps(session, protobuf_implementation): "proto-plus", ] - for dep in prerel_deps: - session.install("--pre", "--no-deps", "--ignore-installed", dep) - # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` - # to the dictionary below once this bug is fixed. - # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add - # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below - # once this bug is fixed. - package_namespaces = { - "google-api-core": "google.api_core", - "google-auth": "google.auth", - "grpcio": "grpc", - "protobuf": "google.protobuf", - "proto-plus": "proto", - } - - version_namespace = package_namespaces.get(dep) + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent + # Extract the base package name, safely ignoring version bounds and spaces + # (e.g., "grpcio>=1.75.1" becomes "grpcio") + parsed_deps = { + dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) + for dep in prerel_deps + } + + # Dynamically sort local packages vs PyPI dependencies + local_paths = [] + pypi_deps = [] + + for dep, pkg_name in parsed_deps.items(): + if (deps_dir / pkg_name).exists(): + local_paths.append(str(deps_dir / pkg_name)) + else: + pypi_deps.append(dep) + + # Batch pip installations to avoid sequential overhead + if local_paths: + session.install(*local_paths, "--no-deps", "--ignore-installed") + if pypi_deps: + session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed") + + # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` + # to the dictionary below once this bug is fixed. + # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add + # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below + # once this bug is fixed. + package_namespaces = { + "google-api-core": "google.api_core", + "google-auth": "google.auth", + "grpcio": "grpc", + "protobuf": "google.protobuf", + "proto-plus": "proto", + } + + # Reuse the parsed names for logging and version verification + for dep, pkg_name in parsed_deps.items(): print(f"Installed {dep}") + version_namespace = package_namespaces.get(pkg_name) + if version_namespace: session.run( "python", @@ -599,10 +626,11 @@ def core_deps_from_source(session, protobuf_implementation): while deps_dir.name != "packages" and deps_dir.parent != deps_dir: deps_dir = deps_dir.parent - for dep in core_dependencies_from_source: - dep_path = str(deps_dir / dep) - session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {dep} locally from {dep_path}") + # Batch the pip installation to avoid sequential overhead + dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] + + session.install(*dep_paths, "--no-deps", "--ignore-installed") + print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") session.run( "py.test", diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py index a4c6c5ea276d..9dbe1aa24718 100755 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py @@ -501,24 +501,51 @@ def prerelease_deps(session, protobuf_implementation): "proto-plus", ] - for dep in prerel_deps: - session.install("--pre", "--no-deps", "--ignore-installed", dep) - # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` - # to the dictionary below once this bug is fixed. - # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add - # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below - # once this bug is fixed. - package_namespaces = { - "google-api-core": "google.api_core", - "google-auth": "google.auth", - "grpcio": "grpc", - "protobuf": "google.protobuf", - "proto-plus": "proto", - } - - version_namespace = package_namespaces.get(dep) + deps_dir = CURRENT_DIRECTORY.parent + while deps_dir.name != "packages" and deps_dir.parent != deps_dir: + deps_dir = deps_dir.parent + # Extract the base package name, safely ignoring version bounds and spaces + # (e.g., "grpcio>=1.75.1" becomes "grpcio") + parsed_deps = { + dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) + for dep in prerel_deps + } + + # Dynamically sort local packages vs PyPI dependencies + local_paths = [] + pypi_deps = [] + + for dep, pkg_name in parsed_deps.items(): + if (deps_dir / pkg_name).exists(): + local_paths.append(str(deps_dir / pkg_name)) + else: + pypi_deps.append(dep) + + # Batch pip installations to avoid sequential overhead + if local_paths: + session.install(*local_paths, "--no-deps", "--ignore-installed") + if pypi_deps: + session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed") + + # TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status`` + # to the dictionary below once this bug is fixed. + # TODO(https://github.com/googleapis/google-cloud-python/issues/13643): Add + # `googleapis-common-protos` and `grpc-google-iam-v1` to the dictionary below + # once this bug is fixed. + package_namespaces = { + "google-api-core": "google.api_core", + "google-auth": "google.auth", + "grpcio": "grpc", + "protobuf": "google.protobuf", + "proto-plus": "proto", + } + + # Reuse the parsed names for logging and version verification + for dep, pkg_name in parsed_deps.items(): print(f"Installed {dep}") + version_namespace = package_namespaces.get(pkg_name) + if version_namespace: session.run( "python", @@ -599,10 +626,11 @@ def core_deps_from_source(session, protobuf_implementation): while deps_dir.name != "packages" and deps_dir.parent != deps_dir: deps_dir = deps_dir.parent - for dep in core_dependencies_from_source: - dep_path = str(deps_dir / dep) - session.install(dep_path, "--no-deps", "--ignore-installed") - print(f"Installed {dep} locally from {dep_path}") + # Batch the pip installation to avoid sequential overhead + dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] + + session.install(*dep_paths, "--no-deps", "--ignore-installed") + print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") session.run( "py.test",