Skip to content

Problematic script darwin-python-path.py when running through uv #1123

@jdumas

Description

@jdumas

This script is causing issues when run through uv:

import ctypes
dyld = ctypes.cdll.LoadLibrary('/usr/lib/system/libdyld.dylib')
namelen = ctypes.c_ulong(1024)
name = ctypes.create_string_buffer(b'\000', namelen.value)
dyld._NSGetExecutablePath(ctypes.byref(name), ctypes.byref(namelen))
print(name.value.decode('utf8').strip())

It's basically returning nothing. This is causing nanobind_resolve_python_path() to produce an error when running nanobind through uv build under macOS.

> uv run --no-project python <nanobind>/cmake/darwin-python-path.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions