Skip to content

Commit

Permalink
Make the lib64 symlink relative (#33)
Browse files Browse the repository at this point in the history
Fixes #35

---------

Co-authored-by: Brett Cannon <brett@python.org>
  • Loading branch information
ur4t and brettcannon authored Mar 15, 2023
1 parent a95cb04 commit 24bc003
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion microvenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def create(env_dir=".venv"):
# There is no guarantee the sysconfig scheme will produce a `lib`
# directory.
if lib_path.is_dir() and not lib64_path.exists():
lib64_path.symlink_to(lib_path, target_is_directory=True)
lib64_path.symlink_to("lib", target_is_directory=True)

for executable_name in (
"python",
Expand Down
2 changes: 2 additions & 0 deletions test_microvenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def test_lib64(full_venv, micro_venv):
assert micro_lib64.exists()
assert micro_lib64.is_symlink()
assert micro_lib64.resolve() == (micro_venv / "lib")
# pathlib.Path.readlink() was added in Python 3.9.
assert os.readlink(micro_lib64) == "lib"


@pytest.mark.parametrize(
Expand Down

0 comments on commit 24bc003

Please sign in to comment.