Skip to content

Commit

Permalink
Fix single-file source support
Browse files Browse the repository at this point in the history
The file needs to be put into a subdirectory in the tarball because we
are expecting to be stripping it.
  • Loading branch information
elprans committed Oct 13, 2024
1 parent 9f33cd5 commit c760c74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion metapkg/packages/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ def _tarball(
comp = ".gz"
target_path = target_dir / name_tpl.format(part=part, comp=comp)
with tarfile.open(target_path, "w:gz") as tf:
tf.add(str(src), arcname=src.name)
tf.add(
str(src),
arcname=str(pathlib.Path(src.name) / src.name),
)
elif src.suffix == ".tgz":
comp = ".gz"
elif src.suffix == ".tbz2":
Expand Down

0 comments on commit c760c74

Please sign in to comment.