-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
setup.py creates a zombie C extension called "freetype2" #3622
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
Conversation
So, at least on Fedora, if you have freetype installed, but pkg-config is somehow broken (I had to manually move it), So, as reported in #3029, installing pkg-config does resolve that issue. We can warn when pkg-config isn't installed that things may not work (though continue to "try" anyway). I'm still not sure how #3067 resolves anything, though. It does get to an error state when the user has no |
seems to be broken. Use that only for version determination. Warn if pkg-config is not present.
Fix attached. |
Your insertion of the warning brings up a thought I have had every time I build mpl: the important section of output at the start of the build, with the information about what was found, scrolls by and is almost immediately lost. Yes, I could use redirection to save it, but I shouldn't have to. Maybe the info could be written to a file, and also displayed again at the end of a build. Otherwise, no one will see your new warning, in most cases. |
@efiring, +1. Always been a pet peeve of mine. On Tue, Oct 7, 2014 at 6:40 PM, Eric Firing [email protected]
|
Sorry for merging broken things..... |
No worries! Small mistakes are a small price to pay for so much good work and progress. |
'lib/freetype2/include/freetype2'], | ||
default_library_dirs=[ | ||
'freetype2/lib'], | ||
default_libraries=['freetype', 'z'], | ||
alt_exec='freetype-config') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to get rid of the alt_exec
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's the crux of the fix here. At least on my system, the result from freetype-config --cflags
is totally and utterly wrong (-I/freetype2
), so better to use pkg-config and, failing that, fall back to the regular default locations. I suspect this was the source of all of the problems that led to the #3067 solution in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I identified the main fix as adding more guesses to the default path.
BLD : fix finding "freetype2"
Since #3067, there has been a useless and unimportable extension created as part of the matplotlib install. We need to remove it.
However, it reportedly fixes a real bug for some, but it's not quite clear how. I'll poke around and see if I can break/fix it in the same way as the original reports and then find a better solution that doesn't install a broken
.so
file.The name of matplotlib's freetype wrapper is ft2font, not freetype2.