File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 100100import sys
101101import tempfile
102102import warnings
103- import platform
104103
105104import numpy
106105from packaging .version import parse as parse_version
Original file line number Diff line number Diff line change @@ -688,11 +688,14 @@ def do_custom_build(self, env):
688688
689689 cc = get_ccompiler ()
690690 cc .initialize () # Get msbuild in the %PATH% of cc.spawn.
691- # Freetype 2.10.0+ support static builds and use them if available as they are easier to deploy
692- msbuild_configuration = 'Release Static' if version .parse (LOCAL_FREETYPE_VERSION ) >= version .parse ("2.10.0" ) else 'Release'
691+ # Freetype 2.10.0+ support static builds.
692+ if version .parse (LOCAL_FREETYPE_VERSION ) >= version .parse ("2.10.0" ):
693+ msbuild_config = 'Release Static'
694+ else :
695+ msbuild_config = 'Release'
693696 cc .spawn (["msbuild" , str (sln_path ),
694697 "/t:Clean;Build" ,
695- f"/p:Configuration={ msbuild_configuration } ;Platform={ msbuild_platform } " ])
698+ f"/p:Configuration={ msbuild_config } ;Platform={ msbuild_platform } " ])
696699 # Move to the corresponding Unix build path.
697700 (src_path / "objs" / ".libs" ).mkdir ()
698701 # Be robust against change of FreeType version.
You can’t perform that action at this time.
0 commit comments