Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "socha"
version = "1.0.6"
version = "1.0.7"
authors = [
{ name = "FalconsSky", email = "stu222782@mail.uni-kiel.de" },
]
Expand Down
8 changes: 6 additions & 2 deletions socha/utils/package_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,13 @@ def _zipdir(self):
zipf = zipfile.ZipFile(f'{self.build_dir}/{self.package_name}.zip', 'w', zipfile.ZIP_DEFLATED)
for root, dirs, files in os.walk(f'{self.build_dir}/{self.package_name}'):
for file in files:
zipf.write(os.path.join(root, file))
file_path = os.path.join(root, file)
arc_name = os.path.relpath(file_path, self.build_dir)
zipf.write(file_path, arcname=arc_name)
for _dir in dirs:
zipf.write(os.path.join(root, _dir))
dir_path = os.path.join(root, _dir)
arc_name = os.path.relpath(dir_path, self.build_dir)
zipf.write(dir_path, arcname=arc_name)
zipf.close()
logging.info(f'{self.package_name}.zip successfully created!')
except Exception as e:
Expand Down