Skip to content

Commit f377dc4

Browse files
authored
Update setupext.py
autogen is used to generate configure.ac,so run it if configure.ac not exist.
1 parent 774ac2f commit f377dc4

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

setupext.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -627,13 +627,11 @@ def do_custom_build(self, env):
627627
},
628628
**env,
629629
}
630-
if os.path.exists(os.path.join(src_path, "autogen.sh")):
631-
try:
632-
subprocess.check_call(["sh", "./autogen.sh"], env=env, cwd=src_path)
633-
except Exception as err:
634-
print(err)
635-
print("Warning: Can not run autogen, the build pipeline may fail")
636-
print("Continue try to build freetype.")
630+
configure_ac = os.path.join(src_path, "builds", "unix", "configure.ac")
631+
if os.path.exists(os.path.join(src_path, "autogen.sh")) \
632+
and not os.path.exists(configure_ac):
633+
print(f"{configure_ac} not exist. Using sh autogen.sh to generate.")
634+
subprocess.check_call(["sh", "./autogen.sh"], env=env, cwd=src_path)
637635
env["CFLAGS"] = env.get("CFLAGS", "") + " -fPIC"
638636
configure = [
639637
"./configure", "--with-zlib=no", "--with-bzip2=no",

0 commit comments

Comments
 (0)