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

Remove dependency on pyobjc? #83

Open
pauldmccarthy opened this issue Jul 25, 2023 · 1 comment
Open

Remove dependency on pyobjc? #83

pauldmccarthy opened this issue Jul 25, 2023 · 1 comment

Comments

@pauldmccarthy
Copy link

pauldmccarthy commented Jul 25, 2023

Howdy send2trash developers!

There is a recurring problem of segmentation faults related to the conda-forge pyobjc packages, upon which send2trash depends:

I should clarify that this is not at all an issue with the send2trash code base, and I am not sure whether the send2trash developers are involved/interested in supporting the corresponding conda-forge package, so it is entirely fair if you decide that this is not your problem.

The problem is beyond my understanding, but involves the pyobjc libraries linking against an incompatble build of libffi. The maintainer of the PyObjC libraries has stated in no uncertain terms that linking against anything other than the system-installation of libffi is entirely unsupported:

For reasons (that are again beyond my understanding), linking against the system libffi installation is problematic for the maintainer of the conda-forge pyobjc package: conda-forge/pyobjc-core-feedstock#37 (comment)

Based on the above, and as I use conda-forge as my primary means of distribution, I decided to completely avoid depending on the conda-forge pyobjc packages, and instead interact with the Objective C runtime directly through the built-in ctypes library*: https://github.com/pauldmccarthy/fsleyes/blob/v1.4/fsleyes/gl/highdpi.py

I am wondering if the send2trash maintainers are concerned about this issue, and would consider doing something similar?

In my instance, using ctypes directly was quite straightforward, and I see that send2trash is already using a similar approach in send2trash.mac.legacy. I'm (perhaps naively) hoping that porting send2trash.mac.modern to use ctypes will be a simple job, but may be mistaken in that assumption.

Thanks!

*As an aside, I was eventually able to completely remove this module from my code base, due to improvements in high-DPI support in wxPython.

@pauldmccarthy
Copy link
Author

pauldmccarthy commented Jul 25, 2023

I should add that this problem seems to be affecting vintage macOS versions (10.13-10.14), so it is arguably entirely reasonable to completely ignore it 🤷‍♂️

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

1 participant