Fix install: find correct freetype libs#3976
Fix install: find correct freetype libs#3976tonysyu wants to merge 1 commit intomatplotlib:masterfrom
Conversation
In particular, freetype installs that target virtual environments aren't located in standard directories, so freetype-config should be used.
|
I'm not that familiar with the build system either (cc @mdboom). However, I wonder if adding sys.prefix (which I'm assuming is where freetype is installed) to https://github.com/tonysyu/matplotlib/blob/fix/install-with-canopy-freetype/setupext.py#L156 does anything? |
|
Actually - it looks like it wont. We don't seem to have the same logic for Png as we do for Freetype (e.g. https://github.com/tonysyu/matplotlib/blob/fix/install-with-canopy-freetype/setupext.py#L976 actually checks the include directories). |
|
This seems to revert, at least in part #3622 Punting this back to 1.4.x. |
|
As @tacaswell says, this appears to revert #3622. Since that fixed broken behaviour and |
Caveat: I really don't have a good grasp of how the build system works, so this PR should be looked over with some suspicion.
I have freetype installed through Canopy, and I didn't want to add yet-another install of it. Currently, the freetype search looks only in a few predefined directories. (In fact, the pre-install check looks in the barest of defaults, even though
add_flagsadds some better default search directories. Even when adding a call toadd_flags, the directory lists don't seem to be used; only the result of thefreetype-configcall seems to matter. This is why I say I don't have a grasp on the build system.)There's not anything Canopy-specific here, per se: This just uses
freetype-configto find include paths (and Canopy installs into a virtual environment, so hard-coded default paths won't work).