Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39064b3

Browse files
authored
Merge pull request #18177 from meeseeksmachine/auto-backport-of-pr-18092-on-v3.3.x
Backport PR #18092 on branch v3.3.x (Use same Make as FreeType's configure to build it.)
2 parents 0fc3614 + f930016 commit 39064b3

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

setupext.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,21 @@ def do_custom_build(self, env):
592592
"--with-png=no", "--with-harfbuzz=no", "--enable-static",
593593
"--disable-shared"],
594594
env=env, cwd=src_path)
595-
subprocess.check_call(["make"], env=env, cwd=src_path)
595+
if 'GNUMAKE' in env:
596+
make = env['GNUMAKE']
597+
elif 'MAKE' in env:
598+
make = env['MAKE']
599+
else:
600+
try:
601+
output = subprocess.check_output(['make', '-v'],
602+
stderr=subprocess.DEVNULL)
603+
except subprocess.CalledProcessError:
604+
output = b''
605+
if b'GNU' not in output and b'makepp' not in output:
606+
make = 'gmake'
607+
else:
608+
make = 'make'
609+
subprocess.check_call([make], env=env, cwd=src_path)
596610
else: # compilation on windows
597611
shutil.rmtree(src_path / "objs", ignore_errors=True)
598612
msbuild_platform = (

0 commit comments

Comments
 (0)