8000 Fix FreeType build PyPy · matplotlib/matplotlib@d85d7dc · GitHub
[go: up one dir, main page]

Skip to content

Commit d85d7dc

Browse files
committed
Fix FreeType build PyPy
PyPy doesn't have a host type, so don't pass `--host` in that case, and hope it is correct (which has been how it was since forever anyway.)
1 parent ae6b7fd commit d85d7dc

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

setupext.py

Lines changed: 9 additions & 6 deletions
< 8000 td data-grid-cell-id="diff-113dbd0ff67f6e8e817884a3e98962eec6856df1fb826932442487e374b827f0-618-618-2" data-line-anchor="diff-113dbd0ff67f6e8e817884a3e98962eec6856df1fb826932442487e374b827f0R618" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell right-side-diff-cell left-side">
}
Original file line numberDiff line numberDiff line change
@@ -617,12 +617,15 @@ def do_custom_build(self, env):
617617
},
618618
619619
env["CFLAGS"] = env.get("CFLAGS", "") + " -fPIC"
620-
subprocess.check_call(
621-
["./configure", "--with-zlib=no", "--with-bzip2=no",
622-
"--with-png=no", "--with-harfbuzz=no", "--enable-static",
623-
"--disable-shared",
624-
"--host=" + sysconfig.get_config_var('BUILD_GNU_TYPE')],
625-
env=env, cwd=src_path)
620+
configure = [
621+
"./configure", "--with-zlib=no", "--with-bzip2=no",
622+
"--with-png=no", "--with-harfbuzz=no", "--enable-static",
623+
"--disable-shared"
624+
]
625+
host = sysconfig.get_config_var('BUILD_GNU_TYPE')
626+
if host is not None: # May be unset on PyPy.
627+
configure.append(f"--host={host}")
628+
subprocess.check_call(configure, env=env, cwd=src_path)
626629
if 'GNUMAKE' in env:
627630
make = env['GNUMAKE']
628631
elif 'MAKE' in env:

0 commit comments

Comments
 (0)
0