support/scripts: fix pycompile for short filenames
authorBert Outtier <outtierbert@gmail.com>
Mon, 29 Mar 2021 10:55:54 +0000 (12:55 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 30 Mar 2021 20:18:44 +0000 (22:18 +0200)
Signed-off-by: Bert Outtier <outtierbert@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
support/scripts/pycompile.py

index 2b636e03cbe5b8a897bcc9860f566df21c0c5eaf..b8cd3cee6c13ba4cf40bda710c7cebb4f4ac39b5 100644 (file)
@@ -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