Skip to content

Commit

Permalink
replace packaging to add any additional files
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDavid committed Sep 10, 2023
1 parent 5530692 commit 140e75b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion libpastis/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ def auto_directory(exe_file: Union[str, Path]) -> Optional['BinaryPackage']:
if file not in [p._main_bin, p._callgraph, p._quokka, p._cmplog, p._dictionary]:
p.other_files.append(file)

return p

def make_package(self) -> Path:
"""
Pack the BinaryPackage in a zip file.
Expand All @@ -247,7 +249,7 @@ def make_package(self) -> Path:
if self._dictionary:
zip.write(self._dictionary, self._dictionary.name)
for file in self.other_files:
zip.write(file)
zip.write(file, file.name)
zip.close()
return Path(fname)

Expand Down
2 changes: 1 addition & 1 deletion pastisbroker/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def _find_binaries(self, binaries_dir) -> None:
for file in d.iterdir():
if file.is_file():
try:
pkg = BinaryPackage.auto(file) # try creating a package
pkg = BinaryPackage.auto_directory(file) # try creating a package
except ValueError: # if not an executable
continue

Expand Down

0 comments on commit 140e75b

Please sign in to comment.