Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to exclude a specific library? #77

Closed
crisluengo opened this issue Jun 15, 2020 · 2 comments
Closed

Is there a way to exclude a specific library? #77

crisluengo opened this issue Jun 15, 2020 · 2 comments

Comments

@crisluengo
Copy link

I have a package that depends, besides a few other things, on libjvm.dylib, because it needs to call some Java code. But we need to use the user's Java installation, which is more than just one library. The module goes through some trouble to locate the user's libjvm.dylib. So including it in the package is not intended.

Ideally there would be a way to exclude a library from being delocated. Just like system libraries are being excluded, we'd be able to add some other libraries to that list.

A colleague found a way to do this with auditwheel: https://github.com/DIPlib/diplib/blob/pydip-experimental/pydip/setup/auditwheel

@matthew-brett
Copy link
Owner

You'd have to do this from a Python script, calling Delocate's functions. Have a look at https://github.com/matthew-brett/delocate/blob/master/delocate/cmd/delocate_wheel.py#L69 and https://github.com/matthew-brett/delocate/blob/master/delocate/delocating.py#L304 . You need to craft a suitable 'copy_filt_func` function - maybe something like:

def no_java(libname):
    if not filter_system_libs(libname):
        return False
    return os.path.basename(libname) != 'libjvm.dylib'

@WillAyd
Copy link

WillAyd commented Jan 9, 2024

A few years later than the OP but I believe this is resolved by #106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants