mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
support/scripts: fix pycompile for short filenames
Signed-off-by: Bert Outtier <outtierbert@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
52bb779ff5
commit
6fdc878d73
@@ -30,7 +30,7 @@ def compile_one(host_path, strip_root=None, verbose=False):
|
|||||||
if os.path.islink(host_path) or not os.path.isfile(host_path):
|
if os.path.islink(host_path) or not os.path.isfile(host_path):
|
||||||
return # only compile real files
|
return # only compile real files
|
||||||
|
|
||||||
if not re.match(r"^[_A-Za-z][_A-Za-z0-9]+\.py$",
|
if not re.match(r"^[_A-Za-z][_A-Za-z0-9]*\.py$",
|
||||||
os.path.basename(host_path)):
|
os.path.basename(host_path)):
|
||||||
return # only compile "importable" python modules
|
return # only compile "importable" python modules
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user