Skip to content

Commit

Permalink
Restore behavior of shipping 0-byte py files as .py, not .mpy
Browse files Browse the repository at this point in the history
(it's smaller on disk)
  • Loading branch information
jepler committed Nov 30, 2023
1 parent d8719e4 commit b2116cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion circuitpython_build_tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def library(library_path, output_directory, package_folder_prefix,
try:
_munge_to_temp(full_path, temp_file, library_version)
temp_file.close()
if mpy_cross:
if mpy_cross and os.stat(temp_file).st_size != 0:
output_file = output_file.with_suffix(".mpy")
mpy_success = subprocess.call([
mpy_cross,
Expand Down

0 comments on commit b2116cb

Please sign in to comment.