Skip to content

pycompile: fix .pyc source paths + improvements

Robin Jarry buildroot 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 0 repliesNew
  2. v32 patches 0 repliesSuperseded
  3. v24 patches 0 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2support/scripts/pycompile: fix .pyc original source file pathspackage/python/python.mk package/python3/python3.mk support/scripts/pycompile.py+99 -573 replies
1/2support/scripts/pycompile: fix .pyc original source file paths+0 -01 reply
1/2support/scripts/pycompile: fix .pyc original source file paths+0 -00 replies
2/2support/scripts/pycompile: add --verbose optionpackage/python/python.mk package/python3/python3.mk support/scripts/pycompile.py+11 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [Buildroot] [PATCH v4 0/2] pycompile: fix .pyc source paths + improvements

This series is about fixing the original .py source paths encoded into .pyc files. It comes with small improvements on pycompile.py as well.

The first two commits of v2 have been applied already, I am sending the last two which needed some rework.

Also, v3 has a problem with python 3.4 and earlier (especially python 2). This v4 should work with all versions of python.

Robin Jarry (2):
support/scripts/pycompile: fix .pyc original source file paths support/scripts/pycompile: add --verbose option

 package/python/python.mk     |   6 +-
 package/python3/python3.mk   |   6 +-
 support/scripts/pycompile.py | 153 +++++++++++++++++++++++------------
 3 files changed, 108 insertions(+), 57 deletions(-)

Differences since v3:

* Fixed errors with python <3.4.

Differences since v2:

* Used str.format() instead of % format.
* Renamed the TARGET positional argument into --strip-root which is

    more explicit. The script is called with --strip-root=$(TARGET_DIR).

* Homogenized the arguments metavars.
* Used argparse type callbacks for directory arguments checking.

Signature · 1 line
2.28.0