Skip to content

Commit

Permalink
Merge branch 'main' into owl-bot-update-lock-5cddfe2fb5019bbf78335bc5…
Browse files Browse the repository at this point in the history
…5f15bc13e18354a56b3ff46e1834f8e540807f05
  • Loading branch information
parthea authored Nov 7, 2024
2 parents 18630ca + 654328e commit 26ab1bb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,23 @@ def unit(session, repository, package, prerelease, protobuf_implementation, work
# Pin mock due to https://github.com/googleapis/python-pubsub/issues/840
session.install("mock==5.0.0", "pytest", "pytest-cov")

install_command = ["-e", f"{working_dir}/{downstream_dir}"]
if prerelease:
session.install("-e", f"{working_dir}/{downstream_dir}")
install_prerelease_dependencies(
session,
f"{working_dir}/{downstream_dir}/testing/constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
)
# Use the `--no-deps` options to allow pre-release versions of dependencies to be installed
install_command.extend(["--no-deps"])
else:
install_command = ["-e", f"{working_dir}/{downstream_dir}"]
contraints_file = f"{CURRENT_DIRECTORY}/testing/constraints-{session.python}-{repository}.txt"
if not Path(contraints_file).exists():
contraints_file = f"{CURRENT_DIRECTORY}/testing/constraints-{session.python}.txt"

install_command.extend(["-c", contraints_file])

# These *must* be the last 3 install commands to get the packages from source.
session.install(*install_command)
session.install(*install_command)

# These *must* be the last install commands to get the packages from source.
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
# The 'cpp' implementation requires Protobuf<4.
if protobuf_implementation == "cpp":
Expand Down

0 comments on commit 26ab1bb

Please sign in to comment.