Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions uv/private/sdist_build/build_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import shutil
import sys
from os import getenv, listdir, path
from subprocess import call
from subprocess import check_call

# Under Bazel, the source dir of a sdist to build is immutable. `build` and
# other tools however are constitutionally incapable of not writing to the
Expand All @@ -29,12 +29,17 @@

outdir = path.abspath(opts.outdir)

call([
sys.executable,
"-m", "build",
"--wheel",
"--no-isolation",
"--outdir", outdir,
], cwd=t)

print(listdir(outdir), file=sys.stderr)
try:
check_call([
sys.executable,
"-m", "build",
"--wheel",
"--no-isolation",
"--outdir", outdir,
], cwd=t)
finally:
print(listdir(outdir), file=sys.stderr)

if not listdir(outdir):
print("Failed to build!", file=sys.stderr)
exit(1)
Loading