Skip to content

Commit c7c6826

Browse files
committed
make package metadata yaml
1 parent 6283019 commit c7c6826

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/penguin/__main__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,14 @@ def _add_file(file_path):
348348
for pf in project_files_list:
349349
f.write(f"{pf}\n")
350350

351-
# Write the version file
351+
# Write the version file as structured YAML
352352
version_file_path = os.path.join(temp_dir, ".penguin_packaged_version")
353+
package_metadata = {
354+
"format_version": 1,
355+
"penguin_version": VERSION
356+
}
353357
with open(version_file_path, "w") as f:
354-
f.write(f"{VERSION}\n")
358+
yaml.dump(package_metadata, f, default_flow_style=False, sort_keys=False)
355359

356360
# Handle external files by copying them into the temp directory
357361
has_external = False

0 commit comments

Comments
 (0)