* [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
* [Buildroot] pycompile script doesn't compile files with single character names
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
0 siblings, 1 reply; 4+ messages in thread
From: Julien Floret @ 2020-12-17 8:22 UTC (permalink / raw)
To: buildroot
Hi Charles,
Le mer. 16 d?c. 2020 ? 14:37, Charles Eidsness via buildroot
<buildroot@busybox.net> a ?crit :
>
> 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
>
Your fix looks good to me. Could you send a git patch using "git
send-email", so that it can be applied by the maintainers?
Thanks!
Julien
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] pycompile script doesn't compile files with single character names
2020-12-17 8:22 ` Julien Floret
@ 2020-12-17 11:58 ` Charles Eidsness
2020-12-17 21:49 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Charles Eidsness @ 2020-12-17 11:58 UTC (permalink / raw)
To: buildroot
On Thu, 17 Dec 2020 at 03:22, Julien Floret <julien.floret@6wind.com> wrote:
>
> Hi Charles,
>
> Le mer. 16 d?c. 2020 ? 14:37, Charles Eidsness via buildroot
> <buildroot@busybox.net> a ?crit :
> >
> > 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
> >
>
> Your fix looks good to me. Could you send a git patch using "git
> send-email", so that it can be applied by the maintainers?
> Thanks!
>
> Julien
Hi Julien,
I don't have git send-email setup but used git format-patch and sent
out an email, hopefully it'll work.
Thanks!
Charles
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] pycompile script doesn't compile files with single character names
2020-12-17 11:58 ` Charles Eidsness
@ 2020-12-17 21:49 ` Yann E. MORIN
0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2020-12-17 21:49 UTC (permalink / raw)
To: buildroot
Caharles, Julien, All,
On 2020-12-17 06:58 -0500, Charles Eidsness via buildroot spake thusly:
> On Thu, 17 Dec 2020 at 03:22, Julien Floret <julien.floret@6wind.com> wrote:
> > Le mer. 16 d?c. 2020 ? 14:37, Charles Eidsness via buildroot
> > <buildroot@busybox.net> a ?crit :
[--SNIP--]
> > Could you send a git patch using "git
> > send-email", so that it can be applied by the maintainers?
Interestingly, this initial patch did get caught up in the patchowrk
list.
> I don't have git send-email setup but used git format-patch and sent
> out an email, hopefully it'll work.
I have now replied to that second iteration, thanks.
What I forgot to add is: add previous reviewers in Cc when you resend a
patch. You can do that by just adding Cc. in the patch commit log, jut
after your Signed-off-by. Keeping previous reviewers in Cc help them
keep track of resend, and look at it again (so they can eventually reply
with their reviewed-by tags, hint-hint Julien ;-) ).
Thanks!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [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