@@ -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=""
@@ -968,11 +969,12 @@ def test_port_build_uses_only_stable_source_prefix_maps(self):
968969 fixture .output .resolve () / "esp32"
969970 ),
970971 "-ffile-prefix-map={}=/MICROPYTHON" .format (upstream ),
972+ "-ffile-prefix-map={}=/IDF" .format (fixture .idf .resolve ()),
971973 )
972974 )
973975 environments = fixture .make_environments ()
974976 self .assertEqual (
975- environments [0 ],
977+ environments [0 ][: - 1 ] ,
976978 ("" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" ),
977979 "ambient compiler flags must not influence the rebuilt compiler" ,
978980 )
@@ -999,7 +1001,7 @@ def test_port_build_uses_only_stable_source_prefix_maps(self):
9991001 1 ,
10001002 )
10011003 self .assertEqual (
1002- environments ,
1004+ [ environment [: - 1 ] for environment in environments ] ,
10031005 [("" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" )] * 3 ,
10041006 "submodule configuration and the final application build must "
10051007 "share exact runner-owned path maps; ambient flags may not be "
@@ -1008,6 +1010,21 @@ def test_port_build_uses_only_stable_source_prefix_maps(self):
10081010 finally :
10091011 fixture .cleanup ()
10101012
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+
10111028 def test_port_build_reuses_the_explicitly_built_host_mpy_cross (self ):
10121029 fixture = BuildScriptFixture ()
10131030 try :
0 commit comments