Skip to content

Commit 033bf0a

Browse files
committed
Restore behavior of shipping 0-byte py files as .py, not .mpy
(it's smaller on disk)
1 parent d8719e4 commit 033bf0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

circuitpython_build_tools/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def library(library_path, output_directory, package_folder_prefix,
275275
try:
276276
_munge_to_temp(full_path, temp_file, library_version)
277277
temp_file.close()
278-
if mpy_cross:
278+
if mpy_cross and os.stat(temp_file).st_size != 0:
279279
output_file = output_file.with_suffix(".mpy")
280280
mpy_success = subprocess.call([
281281
mpy_cross,

0 commit comments

Comments
 (0)