File tree 1 file changed +8
-2
lines changed 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -605,9 +605,16 @@ def do_custom_build(self, env):
605
605
if (src_path / 'objs' / '.libs' / libfreetype ).is_file ():
606
606
return # Bail out because we have already built FreeType.
607
607
608
+ cc = get_ccompiler ()
609
+
608
610
print (f"Building freetype in { src_path } " )
609
611
if sys .platform != 'win32' : # compilation on non-windows
610
- env = {** env , "CFLAGS" : "{} -fPIC" .format (env .get ("CFLAGS" , "" ))}
612
+ env = {
613
+ ** env ,
614
+ "CC" : (shlex .join (cc .compiler ) if sys .version_info >= (3 , 8 )
615
+ else " " .join (shlex .quote (x ) for x in cc .compiler )),
616
+ "CFLAGS" : "{} -fPIC" .format (env .get ("CFLAGS" , "" )),
617
+ }
611
618
subprocess .check_call (
612
619
["./configure" , "--with-zlib=no" , "--with-bzip2=no" ,
613
620
"--with-png=no" , "--with-harfbuzz=no" , "--enable-static" ,
@@ -660,7 +667,6 @@ def do_custom_build(self, env):
660
667
f .truncate ()
661
668
f .write (vcxproj )
662
669
663
- cc = get_ccompiler ()
664
670
cc .initialize () # Get msbuild in the %PATH% of cc.spawn.
665
671
cc .spawn (["msbuild" , str (sln_path ),
666
672
"/t:Clean;Build" ,
You can’t perform that action at this time.
0 commit comments