[PATCH v2] sb: Add support to search for a suitable version of python.
chrisj at rtems.org
Wed Oct 24 00:12:22 UTC 2018
On 23/10/2018 23:47, Malte Münch wrote:
> i have difficulties running the source builder on Archlinux. It worked
> fine before commit 13f4c379997b53b204d8534d198da2fa35dd5630 (sb: Add
> support to search for a suitable version of python.) Know it stops with
> the following error:
Many thanks for testing and reporting the issue.
> [mamu at verstappen rtems]$ ../source-builder/sb-set-builder
> --prefix="$HOME/vcs/git/development/rtems/5" 5/rtems-sparc
> RTEMS Source Builder - Set Builder, 5 (818f3960325a modified)
> Traceback (most recent call last):
> File "../source-builder/sb/cmd-set-builder.py", line 26, in <module>
> line 618, in run
> b = buildset(bset, configs, opts)
> line 82, in __init__
> line 129, in __str__
> text += l[0:text_len]
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 7:
> ordinal not in range(128)
Interesting. I have been changing the macros.py support in the RSB to support
Unicode because long paths in Windows need to be Unicode. I have been attempting
to catch all I could.
Could you please try this patch for me?
diff --git a/source-builder/sb/macros.py b/source-builder/sb/macros.py
index 2abe386..9ba6cac 100644
@@ -123,6 +123,7 @@ class macros:
lc = 0
for l in ds:
lc += 1
+ l = self._unicode_to_str(l)
text += ' %21s %10s %12s' % (' ', ' ', ' ')
To test please add '--dry-run --trace' to the sb-set-builder command. If it does
try a build.
> If i revert back to 8992d20b8c28af7c95c8b95da054aa9d94521426 it works
> fine. I wish i could provide a path so it works for arch but i did not
> understand the way the wrapper script works.
> I am running Archlinux with the following locations (links):
> [mamu at verstappen rtems]$ which python
> [mamu at verstappen rtems]$ which python2
> [mamu at verstappen rtems]$ which python3
> [mamu at verstappen rtems]$ ls -lah /usr/bin/python
> lrwxrwxrwx 1 root root 7 15. Sep 21:13 /usr/bin/python -> python3
Is this link from a package or something you have done?
I have changed the RSB to select python2 first, then python3 and then python.
More information about the devel