okfde / fragdenstaat_de

Froide Theme for fragdenstaat.de
https://fragdenstaat.de
Other
121 stars 21 forks source link

🩹 Fix devsetup for nix setup #418

Closed pajowu closed 9 months ago

pajowu commented 10 months ago

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.

stefanw commented 10 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?

pajowu commented 10 months ago

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