diff options
author | Daniel Bershatsky | 2023-07-28 03:09:07 +0300 |
---|---|---|
committer | Daniel Bershatsky | 2023-07-28 03:09:07 +0300 |
commit | 55b0645a209dd678b7a88c27178884b06146ed1b (patch) | |
tree | 45cb5dac1d4d6b2a724423a1fcbc9c2ee2921993 /python-jaxlib.diff | |
parent | d3597d5571a36cfead15e0dc81bb9f91e359001d (diff) | |
download | aur-55b0645a209dd678b7a88c27178884b06146ed1b.tar.gz |
Display error if wheel build failed
Diffstat (limited to 'python-jaxlib.diff')
-rw-r--r-- | python-jaxlib.diff | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/python-jaxlib.diff b/python-jaxlib.diff new file mode 100644 index 000000000000..8e0b38a2dc18 --- /dev/null +++ b/python-jaxlib.diff @@ -0,0 +1,32 @@ +--- a/jaxlib/tools/build_wheel.py 2023-07-28 03:00:56.894081609 +0300 ++++ b/jaxlib/tools/build_wheel.py 2023-07-28 03:04:32.978292616 +0300 +@@ -29,6 +29,7 @@ + import subprocess + import sys + import tempfile ++from subprocess import PIPE, STDOUT, CalledProcessError + + from bazel_tools.tools.python.runfiles import runfiles + +@@ -311,10 +312,17 @@ + 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, cwd=sources_path, stdout=PIPE, stderr=STDOUT) ++ except CalledProcessError as e: ++ print('STDOUT') ++ print(e.stdout) ++ print('STDERR') ++ print(e.stderr) ++ raise + 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") |