Closed pajowu closed 9 months ago
Would it make sense to move the weasyprint import into the function where it's used so it doesn't get imported at import time?
That’s a good idea too, but I think there are more things in the devsetup script that might need one of the libraries. I’ll investigate that closer tomorrow
This is a bit of an ugly hack: the devsetup calls some django management commands that need native libraries (in this case: weasyprint needing gobject). We set them through DYLD_LIBRARY_PATH, but macOS strips that when calling devsetup.sh, so we have to set it again inside the devsetup script.
I'm sure there is a better way to do that, we probably shouldn't be setting (DY)LD_LIBRARY_PATH in the first place. But I couldn't figure it out yet.