Skip to content

Commit e53a548

Browse files
committed
Always use CMAKE
1 parent 9634db8 commit e53a548

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

setup.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,12 @@ def build_zlib_ng():
103103
build_env["CFLAGS"] = build_env.get("CFLAGS", "") + " -fPIC"
104104
# Add -fPIC flag to allow static compilation
105105
run_args = dict(cwd=build_dir, env=build_env)
106-
if sys.platform == "darwin": # Cmake does not work properly
107-
subprocess.run([os.path.join(build_dir, "configure")], **run_args)
108-
make_program = "gmake" if shutil.which("gmake") else "make"
109-
subprocess.run([make_program, "libz-ng.a"], **run_args)
110-
elif sys.platform == "linux":
111-
subprocess.run([os.path.join(build_dir, "configure")], **run_args)
112-
subprocess.run(["make", "libz-ng.a", "-j", str(cpu_count)], **run_args)
113-
else:
114-
subprocess.run(["cmake", build_dir], **run_args)
115-
# Do not create test suite and do not perform tests to shorten build times.
116-
# There is no need when stable releases of zlib-ng are used.
117-
subprocess.run(["cmake", "--build", build_dir, "--config", "Release",
118-
"--target", "zlibstatic",
119-
"-j", str(cpu_count)], **run_args)
106+
subprocess.run(["cmake", build_dir], **run_args)
107+
# Do not create test suite and do not perform tests to shorten build times.
108+
# There is no need when stable releases of zlib-ng are used.
109+
subprocess.run(["cmake", "--build", build_dir, "--config", "Release",
110+
"--target", "zlibstatic",
111+
"-j", str(cpu_count)], **run_args)
120112
if BUILD_CACHE:
121113
BUILD_CACHE_FILE.write_text(build_dir)
122114
return build_dir

0 commit comments

Comments
 (0)