Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Python pyc only and problem with scripts
@ 2022-08-08  7:40 Federico Pellegrin
  2022-08-08 10:05 ` Marcus Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Federico Pellegrin @ 2022-08-08  7:40 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1621 bytes --]

Hello all,
I've found a minor problem related to the rt-tests package, but that maybe
is slightly more generic and wanted to report and in case understand which
approach would be best to fix it (and contribute a patch then if possible).

The specific problem: rt-tests, besides a few compiled executables,
installs also two tools which are written in Python, namely hwlatdetect and
get_cyclictest_snapshot. These are Python scripts which get installed in
the PYLIB and then a symbolic link is done from /usr/bin to them, so ie we
have: /usr/bin/hwlatdetect ->
/usr/lib/python3.10/site-packages//hwlatdetect.py

Needless to say that once the pycompile.py script is run and original .py
files are removed, of course in the "PYC only" setup (which is the
default), then the link is broken and it will not work.
Additionally that pyc files will not work for scripts like that, so just
somehow fixing the link mentioned above would anyhow not work, as you need
to execute them eventually by explicitly naming the interpreter.

I could imagine that we could have some similar other cases when we are
installing Python scripts directly executed in PYLIB and not modules. But
I'm not sure that installing the scripts there is a good idea as well,
comparing with other distros that doesn't seem to be the case.
So maybe the problem is really in rt-tests after all and the location those
scripts get installed and I may just fix it that way (and contact upstream)?
Otherwise should it be more generic maybe could make sense to have a
facility to list some files that should not be converted to PYC?

Thanks for any input,
Federico

[-- Attachment #1.2: Type: text/html, Size: 1918 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-08-26 16:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-08  7:40 [Buildroot] Python pyc only and problem with scripts Federico Pellegrin
2022-08-08 10:05 ` Marcus Hoffmann
2022-08-08 10:17   ` Thomas Petazzoni via buildroot
2022-08-08 10:30     ` Marcus Hoffmann
2022-08-08 10:47       ` Thomas Petazzoni via buildroot
2022-08-08 17:55         ` Marcus Hoffmann
2022-08-26  9:09       ` Marcus Hoffmann
2022-08-08 10:20 ` Thomas Petazzoni via buildroot
2022-08-08 13:19   ` Federico Pellegrin
2022-08-08 20:48     ` Arnout Vandecappelle
2022-08-09  4:49       ` Federico Pellegrin
2022-08-09 12:54         ` [Buildroot] [External] - " Vincent Fazio
2022-08-09 16:35           ` Yann E. MORIN
2022-08-26 16:31       ` [Buildroot] " James Hilliard
2022-08-26 16:22 ` James Hilliard

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