[Slackbuilds-users] new slpkg-5.4.1 build and runtime errors
KB_SBo
sbo at linuxgalaxy.org
Mon Jul 28 01:54:30 UTC 2025
Hello Dimitris,
on both my main Slackware64-15.0 multilib and the clean qemu VM
Sackware64-15.0 (no multilib) I use for Sbo testing, during build of
slpkg-5.4.1 there is any error:
* Getting build dependencies for wheel...
* Building wheel...
Successfully built slpkg-5.4.1-py3-none-any.whl
*** Error compiling
'/tmp/SBo/package-slpkg/usr/lib64/python3.9/site-packages/slpkg/terminal_selector.py'...
File "/usr/lib64/python3.9/site-packages/slpkg/terminal_selector.py",
line 244
old_checkbox: str = ' [*]' if old_index in self._selected_indices
else ' [ ]'
^
SyntaxError: f-string: expecting '}'
*** Error compiling
'/tmp/SBo/package-slpkg/usr/lib64/python3.9/site-packages/slpkg/terminal_selector.py'...
File "/usr/lib64/python3.9/site-packages/slpkg/terminal_selector.py",
line 244
old_checkbox: str = ' [*]' if old_index in self._selected_indices
else ' [ ]'
^
SyntaxError: f-string: expecting '}'
and the package gets built anyway. This result in the similar syntax
error but the "bad" line 244 is different.
Traceback (most recent call last):
File "/usr/sbin/slpkg", line 5, in <module>
from slpkg.main import main
File "/usr/lib64/python3.9/site-packages/slpkg/main.py", line 15, in
<module>
from slpkg.binaries.install import Packages
File "/usr/lib64/python3.9/site-packages/slpkg/binaries/install.py",
line 12, in <module>
from slpkg.choose_dependencies import ChooseDependencies
File
"/usr/lib64/python3.9/site-packages/slpkg/choose_dependencies.py", line
11, in <module>
from slpkg.terminal_selector import TerminalSelector
File "/usr/lib64/python3.9/site-packages/slpkg/terminal_selector.py",
line 244
instructions_message: str = f"{bg}Press {ec}{gr}[SPACE]{bg},
{ec}{gr}[TAB]{bg} for multi-selection and {ec}{gr}[ENTER]{bg} to select
and accept.{" " * balance_length}{ec}"
^
SyntaxError: f-string: expecting '}'
Seems python isn't too smart when it comes to nested "". Here the patch:
-------------------8<------------------
diff -Naur slpkg-5.4.1/slpkg/terminal_selector.py
slpkg-5.4.1-new/slpkg/terminal_selector.py
--- slpkg-5.4.1/slpkg/terminal_selector.py 2025-07-27
18:50:42.496808753 -0700
+++ slpkg-5.4.1-new/slpkg/terminal_selector.py 2025-07-27
18:35:17.505155774 -0700
@@ -241,7 +241,7 @@
ec = self.endc
message_length: int = 74 # instructions_message length
without ASCII escape colour codes.
balance_length: int = self.columns - message_length
- instructions_message: str = f"{bg}Press {ec}{gr}[SPACE]{bg},
{ec}{gr}[TAB]{bg} for multi-selection and {ec}{gr}[ENTER]{bg} to select
and accept.{" " * balance_length}{ec}"
+ instructions_message: str = f"{bg}Press {ec}{gr}[SPACE]{bg},
{ec}{gr}[TAB]{bg} for multi-selection and {ec}{gr}[ENTER]{bg} to select
and accept.{' ' * balance_length}{ec}"
sys.stdout.write(instructions_message)
self._move_cursor_to(2, 1)
------------------->8------------------
-Ed
More information about the SlackBuilds-users
mailing list