@@ -746,7 +746,7 @@ def __init__(self):
746746 done
747747 printf '\n'
748748 } >> "$PYBLE_MAKE_LOG"
749- printf '%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s\n' \
749+ printf '%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s \n' \
750750 "${CFLAGS_EXTRA-}" \
751751 "${EXTRA_CPPFLAGS-}" \
752752 "${CFLAGS-}" \
@@ -757,7 +757,8 @@ def __init__(self):
757757 "${MAKEFLAGS-}" \
758758 "${MFLAGS-}" \
759759 "${GNUMAKEFLAGS-}" \
760- "${MAKEOVERRIDES-}" >> "$PYBLE_MAKE_ENV_LOG"
760+ "${MAKEOVERRIDES-}" \
761+ "${PYTHONDONTWRITEBYTECODE-}" >> "$PYBLE_MAKE_ENV_LOG"
761762 printf '%s\n' "${MICROPY_MPYCROSS-}" \
762763 >> "$PYBLE_MPY_CROSS_ENV_LOG"
763764 output=""
@@ -973,7 +974,7 @@ def test_port_build_uses_only_stable_source_prefix_maps(self):
973974 )
974975 environments = fixture .make_environments ()
975976 self .assertEqual (
976- environments [0 ],
977+ environments [0 ][: - 1 ] ,
977978 ("" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" ),
978979 "ambient compiler flags must not influence the rebuilt compiler" ,
979980 )
@@ -1000,7 +1001,7 @@ def test_port_build_uses_only_stable_source_prefix_maps(self):
10001001 1 ,
10011002 )
10021003 self .assertEqual (
1003- environments ,
1004+ [ environment [: - 1 ] for environment in environments ] ,
10041005 [("" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" )] * 3 ,
10051006 "submodule configuration and the final application build must "
10061007 "share exact runner-owned path maps; ambient flags may not be "
@@ -1009,6 +1010,21 @@ def test_port_build_uses_only_stable_source_prefix_maps(self):
10091010 finally :
10101011 fixture .cleanup ()
10111012
1013+ def test_build_disables_python_bytecode_cache_generation (self ):
1014+ fixture = BuildScriptFixture ()
1015+ try :
1016+ completed = fixture .build ()
1017+ self .assertEqual (completed .returncode , 0 , completed .stdout )
1018+ environments = fixture .make_environments ()
1019+ self .assertTrue (environments )
1020+ self .assertEqual (
1021+ [environment [- 1 ] for environment in environments ],
1022+ ["1" ] * len (environments ),
1023+ "every build phase must prevent checkout-local Python caches" ,
1024+ )
1025+ finally :
1026+ fixture .cleanup ()
1027+
10121028 def test_port_build_reuses_the_explicitly_built_host_mpy_cross (self ):
10131029 fixture = BuildScriptFixture ()
10141030 try :
0 commit comments