diff --git a/py/private/py_venv/link.py b/py/private/py_venv/link.py index 4b2eb7c4..4bb6b0ec 100644 --- a/py/private/py_venv/link.py +++ b/py/private/py_venv/link.py @@ -15,11 +15,7 @@ virtualenv_name = os.path.basename(virtualenv_home) runfiles_dir = os.path.realpath(os.environ["RUNFILES_DIR"]) builddir = os.path.realpath(os.environ["BUILD_WORKING_DIRECTORY"]) - -# Chop off the runfiles tree prefix -virtualenv_path = virtualenv_home.lstrip(runfiles_dir).lstrip("/") -# Chop off the repo name to get a repo-relative path -virtualenv_path = virtualenv_path[virtualenv_path.find("/"):] +target_package, target_name = os.environ["BAZEL_TARGET"].split("//", 1)[1].split(":") PARSER = argparse.ArgumentParser( prog="link", @@ -36,7 +32,7 @@ PARSER.add_argument( "--dest", dest="dest", - default=os.path.join(builddir, os.path.dirname(virtualenv_path)), + default=os.path.join(builddir, target_package), help="Dir to link the virtualenv into", ) diff --git a/requirements.txt b/requirements.txt index 397cb425..397df8d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -604,9 +604,9 @@ referencing==0.35.0 \ # via # jsonschema # jsonschema-specifications -requests==2.31.0 \ - --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ - --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 +requests==2.32.4 \ + --hash=sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c \ + --hash=sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422 # via # bravado # bravado-core