Skip to contentSkip to conversation

support/scripts: fix pycompile for short filenames

PATCH New Bert Outtier 3 participants 3 messages Mar 29, 2021 – Apr 3, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/scripts: fix pycompile for short filenames

---
 support/scripts/pycompile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/scripts/pycompile.py +1 -1
index 2b636e03cb..b8cd3cee6c 100644
@@ -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
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 support/scripts: fix pycompile for short filenames

Bert, All,

On 2021-03-29 12:55 +0200, Bert Outtier spake thusly:

Quoted 1 line

I was pretty sure I had already handled that issue some time ago... And indeed, there was a patch posted, some changes were requested, but a v2 never materialised.

Applied to master, thanks.

Regards,
Yann E. MORIN.

http://lists.busybox.net/pipermail/buildroot/2020-December/298707.html
http://lists.busybox.net/pipermail/buildroot/2020-December/298734.html

Quoted 24 lines
---
 support/scripts/pycompile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/scripts/pycompile.py +1 -1
index 2b636e03cb..b8cd3cee6c 100644
@@ -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
 
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 support/scripts: fix pycompile for short filenames

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Bert, All,
On 2021-03-29 12:55 +0200, Bert Outtier spake thusly:

Quoted 1 line

I was pretty sure I had already handled that issue some time ago... And indeed, there was a patch posted, some changes were requested, but a v2 never materialised.

Quoted 7 lines

Applied to master, thanks.

Regards,
Yann E. MORIN.

http://lists.busybox.net/pipermail/buildroot/2020-December/298707.html
http://lists.busybox.net/pipermail/buildroot/2020-December/298734.html

Committed to 2020.02.x, 2020.11.x and 2021.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard