Compare commits

...

2 Commits

Author SHA1 Message Date
Marco Rodolfi 6993516ccb Bugfix: Unable to load _sqlite3 on main SteamOS (#507)
* Update to latest python

I have odd behaviour with importing sqlite3, which is failing to do. I have no clue why, so I'm trying to update Python to the latest stable to check if it's a Python bug.

* Update aiohttp for python compatibility

* Sligtly lower aiohttp version

* Update pyinstaller to latest stable version

It was failing to build a working executable with the latest python runtime.
2023-07-23 19:30:54 -07:00
Party Wumpus 37c1a0e964 Ignore chmod if decky is not run as root (#510)
* Ignore chmod if decky is not run as root

* I can't read

* i managed to make a mistake on 2/3 lines i edited....

* add warning on startup

* logger.warn is depreciated

* Update localplatformlinux.py
2023-07-21 23:00:08 +01:00
4 changed files with 16 additions and 11 deletions
+6 -6
View File
@@ -47,15 +47,15 @@ jobs:
with:
node-version: 18
- name: Set up Python 3.10.2 🐍
- name: Set up Python 3.11.4 🐍
uses: actions/setup-python@v4
with:
python-version: "3.10.2"
python-version: "3.11.4"
- name: Install Python dependencies ⬇️
run: |
python -m pip install --upgrade pip
pip install pyinstaller==5.5
pip install pyinstaller==5.13.0
[ -f requirements.txt ] && pip install -r requirements.txt
- name: Install JS dependencies ⬇️
@@ -97,15 +97,15 @@ jobs:
with:
node-version: 18
- name: Set up Python 3.10.2 🐍
- name: Set up Python 3.11.4 🐍
uses: actions/setup-python@v4
with:
python-version: "3.10.2"
python-version: "3.11.4"
- name: Install Python dependencies ⬇️
run: |
python -m pip install --upgrade pip
pip install pyinstaller==5.5
pip install pyinstaller==5.13.0
pip install -r requirements.txt
- name: Install JS dependencies ⬇️
+3 -1
View File
@@ -60,6 +60,8 @@ def chown(path : str, user : UserType = UserType.HOST_USER, recursive : bool =
return result == 0
def chmod(path : str, permissions : int, recursive : bool = True) -> bool:
if _get_effective_user_id() != 0:
return True
result = call(["chmod", "-R", str(permissions), path] if recursive else ["chmod", str(permissions), path])
return result == 0
@@ -191,4 +193,4 @@ def get_unprivileged_user() -> str:
logger.warn("Unprivileged user is not properly configured. Defaulting to 'deck'")
user = 'deck'
return user
return user
+4 -1
View File
@@ -24,7 +24,7 @@ from aiohttp_jinja2 import setup as jinja_setup
# local modules
from browser import PluginBrowser
from helpers import (REMOTE_DEBUGGER_UNIT, csrf_middleware, get_csrf_token,
mkdir_as_user, get_system_pythonpaths)
mkdir_as_user, get_system_pythonpaths, get_effective_user_id)
from injector import get_gamepadui_tab, Tab, get_tabs, close_old_tabs
from loader import Loader
@@ -178,6 +178,9 @@ if __name__ == "__main__":
# Required for multiprocessing support in frozen files
multiprocessing.freeze_support()
else:
if get_effective_user_id() != 0:
logger.warning(f"decky is running as an unprivileged user, this is not officially supported and may cause issues")
# Append the loader's plugin path to the recognized python paths
sys.path.append(path.join(path.dirname(__file__), "plugin"))
+3 -3
View File
@@ -1,5 +1,5 @@
aiohttp==3.8.1
aiohttp-jinja2==1.5.0
aiohttp==3.8.4
aiohttp-jinja2==1.5.1
aiohttp_cors==0.7.0
watchdog==2.1.7
certifi==2022.12.7
certifi==2022.12.7