Skip to content

Commit

Permalink
Added errors if compiling fails
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlegiantJGC committed Nov 26, 2024
1 parent 5111fe2 commit b17e0d2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build_extension(self, ext):
platform_args.extend(["-A", "Win32"])
platform_args.extend(["-T", "v143"])

subprocess.run(
if subprocess.run(
[
"cmake",
*platform_args,
Expand All @@ -45,9 +45,12 @@ def build_extension(self, ext):
"-B",
"build",
]
)
subprocess.run(["cmake", "--build", "build", "--config", "Release"])
subprocess.run(["cmake", "--install", "build", "--config", "Release"])
).returncode:
raise RuntimeError("Error configuring amulet_nbt")
if subprocess.run(["cmake", "--build", "build", "--config", "Release"]).returncode:
raise RuntimeError("Error installing amulet_nbt")
if subprocess.run(["cmake", "--install", "build", "--config", "Release"]).returncode:
raise RuntimeError("Error installing amulet_nbt")


cmdclass["build_ext"] = CMakeBuild
Expand Down

0 comments on commit b17e0d2

Please sign in to comment.