BLD: Simplify library linking on Windows#9693
BLD: Simplify library linking on Windows#9693Kojoley wants to merge 1 commit intomatplotlib:masterfrom
Conversation
| # Make the header files and the rest of the static libs available during the build | ||
| # CONDA_DEFAULT_ENV is a env variable which is set to the currently active environment path | ||
| set MPLBASEDIRLIST=%CONDA_DEFAULT_ENV%\Library\;. | ||
| # to force the build against static libpng and zlib libraries do follow |
There was a problem hiding this comment.
My bad English. I meant do the following.
d3cbc1f to
0a89734
Compare
|
On linux, the correct way to link freetype (or other librairies) statically is to pass in the result of |
https://en.wikipedia.org/wiki/Auto-linking
Not necessarily, it depends how static lib was built. |
|
@anntzer maybe you know a better way than |
0a89734 to
f650c67
Compare
|
I think the "correct" way is to subclass the bdist_wheel command? (if you override a method called early enough it should be sufficient to override the options on the extensions). |
|
This was included in #13077 so closing. |
The PR simplifies matplotlib build process on Windows (especially with conda).
Implemented a new environment variable and
setup.cfgoption to switch between static or shared linking (useful for wheels).I am not sure about the default value of the switch. I think that in conda env by default build should be shared and at wheels building it should be static. I did not touch freetype because on Windows shared freetype is not supported.
P.S:
zlibin defaultfreetypelibs seems to me as not a right guess. It could require any ofzlib,bzip2,libpng,harfbuzzfor linking (depends on used flags at freetype building).