-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Install on Windows using pkg-config from conda #13016
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
Comments
Does un-hardcoding |
I have not investigated too much (among other things because I'm not familiar with pkg-config even on Linux or how matplotlib build works in details). Also I don't have a Windows machine to try it on at the moment... Opened this issue in case someone finds the above information useful. |
No worries, we can keep this around for now. |
In the meantime, if you want to install from the github zip on Windows, your best bet is probably to create z.lib and png.lib somewhere, then set the |
I looked a bit into it; it's actually not too hard to use pkg-config on Windows too once #13064 is merged (specifically, the "don't-try-to-parse-pkgconfig-output" part -- then we can just use pkg-config --msvc-syntax). However, there's also the issue that the libpng pkg-config files are actually invalid (conda-forge/libpng-feedstock#26), moreover they are only shipped by conda-forge and upstream libpng explicitly does not intend the pkg-config files to be used on Windows (conda-forge had to patch that) so I'm not sure how I feel about using them here. |
Closing per above; thanks for the suggestion @rth and feel free to further comment on Windows builds. |
Thanks for investigating this possibility! |
The current way of installing from sources on Windows involves running the
build_alllocal.cmd
script which manually copieslibz
andlibpng
to the right location. Such approach doesn't work with e.g.,where
matplotlib.zip
is the source distribution, taken e.g. from an open PR.As far as I understand, on Linux this is solved by using
pkg-config
. On Windows,pkg-config
can also be installed from themsys2
channel which is now parts of the default channel, as,see conda-forge/pkg-config-feedstock#11 (comment)
This might help to detect the libpng/freetype libraries (I'm not fully sure), however in any case, install fails while linking libpng,
See detailed_log.txt for more details (this builds the #11577 PR)
I'm wondering if this has anything to do with the fact that
PkgConfig.has_pkgconfig
is hardcoded to False insetupext.py
when on Windows.Opening this issue to track the usage of pkg-config on windows.
Versions
Related: #9693
The text was updated successfully, but these errors were encountered: