Skip to content

Commit e5c2112

Browse files
author
Matt Mackay
authored
fix: use original interpreter path as 'home' value in pyvenv.cfg (#226)
Use the original (source) interpreters bin path as the 'home' value in the generated `pyvenv.cfg` file. Closes #159 --- ### Type of change - Bug fix (change which fixes an issue) **For changes visible to end-users** - Suggested release notes are provided below: Ensure correct `home` pathing is used when generating the venv. ### Test plan - Covered by existing test cases - Manual testing; please provide instructions so we can reproduce: Updated e2e smoke to use py3.11
1 parent 305f93d commit e5c2112

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

e2e/smoke/MODULE.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ bazel_dep(name = "rules_python", dev_dependency = True, version = "0.22.0")
1111

1212
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
1313
python.toolchain(
14-
name = "python3_9",
14+
name = "python3",
1515
configure_coverage_tool = True,
16-
python_version = "3.9",
16+
python_version = "3.11",
1717
)
18-
use_repo(python, "python3_9_toolchains")
18+
use_repo(python, "python3_toolchains")
1919

2020
register_toolchains(
21-
"@python3_9_toolchains//:all",
21+
"@python3_toolchains//:all",
2222
)

py/private/entry.tmpl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ mkdir "${VBIN_LOCATION}" 2>/dev/null || true
9191
ln -snf ${VENV_SOURCE}/bin/* "${VBIN_LOCATION}/"
9292
ln -snf "${PYTHON_LOCATION}" "${VBIN_LOCATION}/python"
9393

94-
echo "home = ${VBIN_LOCATION}" > "${VENV_LOCATION}/pyvenv.cfg"
94+
echo "home = ${PYTHON_BIN_DIR}" > "${VENV_LOCATION}/pyvenv.cfg"
9595
echo "include-system-site-packages = false" >> "${VENV_LOCATION}/pyvenv.cfg"
9696
echo "version = ${PYTHON_VERSION}" >> "${VENV_LOCATION}/pyvenv.cfg"
9797

0 commit comments

Comments
 (0)