Skip to content

Commit

Permalink
fix: installer not allowed with no-isolation (#49)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii authored May 10, 2024
1 parent 661c81a commit 5c41a45
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/check_sdist/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@ def sdist_files(
"--sdist",
"--outdir",
outdir,
f"--installer={installer}",
f"--installer={installer}" if isolated else "--no-isolation",
]
if not isolated:
cmd.append("--no-isolation")
subprocess.run(cmd, check=True, cwd=source_dir)

(outpath,) = Path(outdir).glob("*.tar.gz")

with tarfile.open(outpath) as tar:
prefixes = {n.split("/", maxsplit=1)[0] for n in tar.getnames()}
if len(prefixes) != 1:
msg = f"malformted SDist, contains multiple packages {prefixes}"
msg = f"malformed SDist, contains multiple packages {prefixes}"
raise AssertionError(msg)
return frozenset(
t.name.split("/", maxsplit=1)[1]
Expand Down

0 comments on commit 5c41a45

Please sign in to comment.