Fix yapyc uids blinking
import os
import ymake
-from _common import stripext, rootrel_arc_src, listid, resolve_to_ymake_path, generate_chunks
+from _common import stripext, rootrel_arc_src, tobuilddir, listid, resolve_to_ymake_path, generate_chunks
from pyx import PyxParser
@@ -299,12 +299,14 @@ def onpy_srcs(unit, *args):
for path, mod in pys:
root_rel_path = rootrel_arc_src(path, unit)
- unit.onpy_compile_bytecode([root_rel_path + '-', path])
+ src = unit.resolve_arc_path(path) or path
+ dst = tobuilddir(src) + '.yapyc'
+ unit.onpy_compile_bytecode([root_rel_path + '-', src])
key = '/py_modules/' + mod
res += [
path, key,
'-', 'resfs/src/{}={}'.format(key, root_rel_path),
- path + '.yapyc', '/py_code/' + mod,
+ dst, '/py_code/' + mod,
]
unit.onresource(res)
