2 Commits

Author SHA1 Message Date
deepend-tildeclub
72427006dd Merge pull request #231 from mlt/py-eol
fix(python): concatenate bytes in compile_line of py console
2026-05-12 15:34:31 -06:00
Mikhail Titov
23d0963c2d fix(python): decode the console input to str in _on_say_command 2026-05-10 23:57:43 -05:00
2 changed files with 10 additions and 30 deletions

View File

@@ -86,17 +86,15 @@ jobs:
cp -a /usr/lib/x86_64-linux-gnu/python3/dist-packages AppDir/usr/lib/x86_64-linux-gnu/python3/ cp -a /usr/lib/x86_64-linux-gnu/python3/dist-packages AppDir/usr/lib/x86_64-linux-gnu/python3/
fi fi
for perl_dir in /usr/lib/*/perl-base; do if [ -d "/usr/lib/x86_64-linux-gnu/perl" ]; then
if [ -d "$perl_dir" ]; then install -d AppDir/usr/lib/x86_64-linux-gnu
install -d "AppDir$(dirname "$perl_dir")" cp -a /usr/lib/x86_64-linux-gnu/perl AppDir/usr/lib/x86_64-linux-gnu/
cp -a "$perl_dir" "AppDir$perl_dir"
fi fi
done
perl -MConfig -e 'print join "\n", grep { defined && length && -d } @Config{qw(privlibexp archlibexp vendorlibexp vendorarchexp sitelibexp sitearchexp)}' | while IFS= read -r perl_dir; do if [ -d "/usr/share/perl" ]; then
install -d "AppDir$(dirname "$perl_dir")" install -d AppDir/usr/share
cp -aL "$perl_dir" "AppDir$perl_dir" cp -a /usr/share/perl AppDir/usr/share/
done fi
if [ -d "/usr/share/perl5" ]; then if [ -d "/usr/share/perl5" ]; then
install -d AppDir/usr/share install -d AppDir/usr/share
@@ -213,24 +211,6 @@ jobs:
unset GTK_MODULES unset GTK_MODULES
perl5lib_entries=""
for perl_dir in \
"$APPDIR/usr/lib"/*/perl-base \
"$APPDIR/usr/lib"/*/perl/* \
"$APPDIR/usr/lib"/*/perl5/* \
"$APPDIR/usr/local/lib"/*/perl/* \
"$APPDIR/usr/local/lib"/*/perl5/* \
"$APPDIR/usr/local/share/perl"/* \
"$APPDIR/usr/share/perl"/* \
"$APPDIR/usr/share/perl5"; do
if [ -d "$perl_dir" ]; then
perl5lib_entries="${perl5lib_entries:+$perl5lib_entries:}$perl_dir"
fi
done
if [ -n "$perl5lib_entries" ]; then
export PERL5LIB="$perl5lib_entries${PERL5LIB:+:$PERL5LIB}"
fi
export PYTHONHOME="$APPDIR/usr" export PYTHONHOME="$APPDIR/usr"
python_stdlib_dir="$(find "$APPDIR/usr/lib" -maxdepth 1 -type d -name 'python3.*' | head -n 1 || true)" python_stdlib_dir="$(find "$APPDIR/usr/lib" -maxdepth 1 -type d -name 'python3.*' | head -n 1 || true)"
pythonpath_entries="" pythonpath_entries=""

View File

@@ -320,9 +320,9 @@ def _on_say_command(word, word_eol, userdata):
return 0 return 0
try: try:
python = _cstr(word_eol[1]) python = __decode(_cstr(word_eol[1]))
except Exception: except Exception:
python = b'' python = ''
if not python: if not python:
return 1 return 1