Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] pycompile script doesn't compile files with single character names
@ 2020-12-16 13:37 Charles Eidsness
  2020-12-17  8:22 ` Julien Floret
  0 siblings, 1 reply; 4+ messages in thread
From: Charles Eidsness @ 2020-12-16 13:37 UTC (permalink / raw)
  To: buildroot

Hi All,

I'm not sure if this is by design but the pycompile utility won't compile
single character python files. This causes an issue if you've selected pyc
files only and are building python-dnspython, which has some single
character filenames.

Here is a simple fix:

diff --git a/support/scripts/pycompile.py b/support/scripts/pycompile.py
index 7041a0506b..e2cfc2683c 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):
         return  # only compile real files

     if not re.match(
-            r"^[_A-Za-z][_A-Za-z0-9]+\.py$", os.path.basename(host_path)
+            r"^[_A-Za-z][_A-Za-z0-9]*\.py$", os.path.basename(host_path)
     ):
         return  # only compile "importable" python modules
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201216/3cd34951/attachment.html>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-17 21:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-16 13:37 [Buildroot] pycompile script doesn't compile files with single character names Charles Eidsness
2020-12-17  8:22 ` Julien Floret
2020-12-17 11:58   ` Charles Eidsness
2020-12-17 21:49     ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox