mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01:00
feat: pack licenses into tarball (WIP)
This commit is contained in:
1 parent
5776f4c49f
commit
abdfd2e995
8 files changed
+16
-2
No files matched your search
+16
-2
@@ -62,14 +62,28 @@ if proc.returncode == 0:
|
||||
tarpath = output.joinpath(tarname)
|
||||
with tarfile.open(tarpath, "w:gz") as tar:
|
||||
info = tar.gettarinfo(subfolder)
|
||||
info.type = tarfile.DIRTYPE
|
||||
info.uname = appname
|
||||
info.name = appname
|
||||
with open(subfolder, "rb") as f:
|
||||
tar.addfile(info, f)
|
||||
#with open(subfolder, "rb") as f:
|
||||
# tar.add(info, f)
|
||||
|
||||
tar.add(subfolder, arcname="dzgui")
|
||||
|
||||
#for file in subfolder.iterdir():
|
||||
# info = tar.gettarinfo(file)
|
||||
# info.uname = appname
|
||||
# info.name = appname
|
||||
# with open(file, "rb") as f:
|
||||
# tar.addfile(info, f)
|
||||
print(f"Wrote tarfile to '{tarpath}'")
|
||||
|
||||
proc = subprocess.run([release_exe, "-v"], capture_output=True, text=True)
|
||||
assert proc.stdout.rstrip() == version
|
||||
|
||||
release_exe.unlink()
|
||||
license_file.unlink()
|
||||
subfolder.rmdir()
|
||||
Path(wheel).unlink()
|
||||
|
||||
# TODO: clean up staging directory
|
||||
Reference in new issue
Block a user