From: Bert Outtier Date: Mon, 29 Mar 2021 10:55:54 +0000 (+0200) Subject: support/scripts: fix pycompile for short filenames X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6fdc878d73938e70335a667a831ded67a15df53c;p=buildroot.git support/scripts: fix pycompile for short filenames Signed-off-by: Bert Outtier Signed-off-by: Yann E. MORIN --- diff --git a/support/scripts/pycompile.py b/support/scripts/pycompile.py index 2b636e03cb..b8cd3cee6c 100644 --- a/support/scripts/pycompile.py +++ b/support/scripts/pycompile.py @@ -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): 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)): return # only compile "importable" python modules