summarylogtreecommitdiffstats
path: root/python-jaxlib.diff
blob: 214dd7db87d97763c2aca15fb9a288280b1c8190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/jaxlib/tools/build_wheel.py	2023-07-28 03:00:56.894081609 +0300
+++ b/jaxlib/tools/build_wheel.py	2023-07-28 03:32:53.284008361 +0300
@@ -311,10 +311,14 @@
   platform_tag_arg = f"-C=--build-option=--plat-name={platform_name}_{cpu_name}"
   if os.environ.get('JAXLIB_NIGHTLY'):
     edit_jaxlib_version(sources_path)
-  subprocess.run(
-    [sys.executable, "-m", "build", "-n", "-w",
-     python_tag_arg, platform_tag_arg],
-    check=True, cwd=sources_path)
+  try:
+    subprocess.run(
+      [sys.executable, "-m", "build", "-n", "-w",
+       python_tag_arg, platform_tag_arg],
+      check=True, capture_output=True, cwd=sources_path)
+  except subprocess.CalledProcessError as e:
+    raise RuntimeError(f'Command {e.cmd} returned non-zero exit status.',
+                       {'stdout': e.stdout, 'stderr': stderr}) from e
   for wheel in glob.glob(os.path.join(sources_path, "dist", "*.whl")):
     output_file = os.path.join(output_path, os.path.basename(wheel))
     sys.stderr.write(f"Output wheel: {output_file}\n\n")