Skip to content

Conversation

@geofft
Copy link
Collaborator

@geofft geofft commented Dec 1, 2025

TODO description, just want to get CI running

@geofft geofft added platform:darwin Specific to the macOS platform platform:linux Specific to the Linux platform python:3.14 python:3.15 arch:x86_64 and removed python:3.15 labels Dec 1, 2025
@jjhelmus
Copy link
Contributor

jjhelmus commented Dec 2, 2025

Passing the path the the executable via the library variable in getpath.py has a smell as the variable is described as being the path to the dylib/DLL/so. When static linking there is no shared library so I see the logic in passing the path to the binary (as it is a DSO) itself.

@jjhelmus
Copy link
Contributor

jjhelmus commented Dec 2, 2025

With this patch the directory pointed to by home in the pyvenv.cfg is still searched if the library search fails (but it should not fail).

The change from python/cpython#106045 (comment) (below) would update this path to the directory of the base_executable when it exists. I'm somewhat partial to that solution in addition to this change.

@@ -411,6 +412,9 @@ def search_up(prefix, *landmarks, test=isfile):
                             if isfile(candidate):
                                 base_executable = candidate
                                 break
+                if base_executable and isfile(base_executable):
+                    # Update the executable directory to be based on the resolved base executable
+                    executable_dir = real_executable_dir = dirname(base_executable)
             # home key found; stop iterating over lines
             break

@jjhelmus
Copy link
Contributor

jjhelmus commented Dec 2, 2025

I've found following helpful check/reproduce/debug this issue:

./configure --prefix=/example
make -j
make DESTDIR=<some_real_path> install
cd <some_real_path>
./example/bin/python3.14 # can be used to create symlinks/venv/etc 

@jjhelmus jjhelmus closed this Dec 2, 2025
@zanieb
Copy link
Member

zanieb commented Dec 2, 2025

Did you mean to close this?

@jjhelmus jjhelmus reopened this Dec 2, 2025
@jjhelmus
Copy link
Contributor

jjhelmus commented Dec 2, 2025

Did you mean to close this?

Nope, oops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch:x86_64 platform:darwin Specific to the macOS platform platform:linux Specific to the Linux platform python:3.14

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants