To start with, I am very new to building with windows SDK - so this issue is probably related with a bad practise: please tell.
Since commit 386b4e5 I have been unable to build using a local static png dependency (the one generously provided online by: http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib). Previously it would build even with png version = None ; now a CheckFailed error is raised.
As a workaround I ended adding the same try / catch pattern in check method of
Png class as in the LibAgg class of setupext.py. I am really unsure this the good thing to do ; however in this case I would be happy to learn.
Allow local libpng copy
I'm Cc'ing @cgohlke as our resident Windows expert.
I'm not sure I follow what you're trying to do here. At present when something in matplotlib says "using local copy", it means using a copy of the library that we include with the matplotlib source code. We don't include libpng in our source tree, so it doesn't make sense to say we are "using local copy".
I guess the issue here is that libpng isn't found with pkg-config, but it should continue because the other default values of include and library paths should find it from Christoph's packages. That seems right -- but perhaps the message should be "not found with pkg-config", rather than "using local copy".
In any event, I'll defer to @cgohlke for the best solution on this one.
I can confirm the issue and that this PR works. Perhaps the error message could be ending with "Using unknown version", consistent with freetype, so the png status reads png: yes [pkg-config information for 'libpng' could not be found. Using unknown version.]
png: yes [pkg-config information for 'libpng' could not be found. Using unknown version.]
Perfect, and thanks for the confirmation. I'll go ahead and make the change.
For the record (84a7a1f and 620117f)