Skip to content

Commit f295d37

Browse files
authored
Merge pull request #17 from python-project-templates/tkp/raise
raise on subprocess error
2 parents 6a55919 + bff26a5 commit f295d37

2 files changed

Lines changed: 3 additions & 47 deletions

File tree

hatch_js/plugin.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -62,49 +62,3 @@ def initialize(self, version: str, build_data: dict[str, Any]) -> None:
6262

6363
# Perform any cleanup actions
6464
build_plan.cleanup()
65-
66-
# if build_plan.libraries:
67-
# # force include libraries
68-
# for library in build_plan.libraries:
69-
# name = library.get_qualified_name(build_plan.platform.platform)
70-
# build_data["force_include"][name] = name
71-
72-
# build_data["pure_python"] = False
73-
# machine = platform_machine()
74-
# version_major = version_info.major
75-
# version_minor = version_info.minor
76-
# if "darwin" in sys_platform:
77-
# os_name = "macosx_11_0"
78-
# elif "linux" in sys_platform:
79-
# os_name = "linux"
80-
# else:
81-
# os_name = "win"
82-
# if all([lib.py_limited_api for lib in build_plan.libraries]):
83-
# build_data["tag"] = f"cp{version_major}{version_minor}-abi3-{os_name}_{machine}"
84-
# else:
85-
# build_data["tag"] = f"cp{version_major}{version_minor}-cp{version_major}{version_minor}-{os_name}_{machine}"
86-
# else:
87-
# build_data["pure_python"] = False
88-
# machine = platform_machine()
89-
# version_major = version_info.major
90-
# version_minor = version_info.minor
91-
# # TODO abi3
92-
# if "darwin" in sys_platform:
93-
# os_name = "macosx_11_0"
94-
# elif "linux" in sys_platform:
95-
# os_name = "linux"
96-
# else:
97-
# os_name = "win"
98-
# build_data["tag"] = f"cp{version_major}{version_minor}-cp{version_major}{version_minor}-{os_name}_{machine}"
99-
100-
# # force include libraries
101-
# for path in Path(".").rglob("*"):
102-
# if path.is_dir():
103-
# continue
104-
# if str(path).startswith(str(build_plan.cmake.build)) or str(path).startswith("dist"):
105-
# continue
106-
# if path.suffix in (".pyd", ".dll", ".so", ".dylib"):
107-
# build_data["force_include"][str(path)] = str(path)
108-
109-
# for path in build_data["force_include"]:
110-
# self._logger.warning(f"Force include: {path}")

hatch_js/structs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ def execute(self):
8888
chdir(self.path)
8989

9090
for command in self.commands:
91-
system_call(command)
91+
ret = system_call(command)
92+
if ret != 0:
93+
raise RuntimeError(f"hatch-js build command failed with exit code {ret}: {command}")
9294

9395
# Check that all targets exist
9496
# Go back to original path

0 commit comments

Comments
 (0)