Skip to content

Commit

Permalink
Fail CMakeBuild if subprocess fails. (#1679)
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec authored Nov 15, 2024
1 parent c91e562 commit 85c9166
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pytket/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def run(self):
os.mkdir(build_dir)
install_dir = os.getenv("INSTALL_DIR")
subprocess.run(
["cmake", f"-DCMAKE_INSTALL_PREFIX={install_dir}", os.pardir], cwd=build_dir
["cmake", f"-DCMAKE_INSTALL_PREFIX={install_dir}", os.pardir],
cwd=build_dir,
check=True,
)
subprocess.run(
[
Expand All @@ -73,8 +75,9 @@ def run(self):
f"-j{os.getenv('PYTKET_CMAKE_N_THREADS', multiprocessing.cpu_count())}",
],
cwd=build_dir,
check=True,
)
subprocess.run(["cmake", "--install", os.curdir], cwd=build_dir)
subprocess.run(["cmake", "--install", os.curdir], cwd=build_dir, check=True)
lib_folder = os.path.join(install_dir, "lib")
lib_names = ["libtklog.so", "libtket.so"]
ext_suffix = get_config_var("EXT_SUFFIX")
Expand Down

0 comments on commit 85c9166

Please sign in to comment.