Update soundrts to work with python 3.12 and later

This commit is contained in:
Michael Taboada 2024-02-19 02:56:15 -08:00
parent c7f4f546d8
commit 24a5a38e79

View File

@ -818,10 +818,13 @@ case "${game}" in
check_dependencies python3
mkdir -p "${installPath}"
git -C "${installPath}" clone "https://github.com/soundmud/soundrts.git"
git -C "${installPath}/soundrts" checkout v1.3.7
git -C "${installPath}/soundrts" checkout v1.3.8
sed -i 's;git+https://github.com/soundmud/accessible_output2;accessible_output2;' "${installPath}/soundrts/requirements.txt"
python3 -m venv --system-site-packages "${installPath}/soundrts/.venv"
"${installPath}/soundrts/.venv/bin/"pip3 install -r "${installPath}/soundrts/requirements.txt"
if [ $(python3 --version | cut -d. -f2) -ge 12 ] ; then
"${installPath}/soundrts/.venv/bin/"pip3 install pyasyncore pyasynchat
fi
chmod +x "${installPath}/soundrts/soundrts.py"
sed -i '1c\#!'"${installPath}/soundrts/.venv/bin/python3" "${installPath}/soundrts/soundrts.py"
add_launcher "${installPath}/soundrts/soundrts.py"