diff options
| author | marios8543 <marios8543@gmail.com> | 2023-10-31 17:04:48 +0200 |
|---|---|---|
| committer | marios8543 <marios8543@gmail.com> | 2023-10-31 17:04:48 +0200 |
| commit | 44e6f03b0655a9f1e87530141ad907b9553744cc (patch) | |
| tree | c675bb7228de8b37ea52906110abbed226ba89c6 | |
| parent | d00506d141eb940e6e6c0e2d2cf8b558070f8d7a (diff) | |
| download | decky-loader-44e6f03b0655a9f1e87530141ad907b9553744cc.tar.gz decky-loader-44e6f03b0655a9f1e87530141ad907b9553744cc.zip | |
Fix logging.handlers import and improve plugin modulesv2.10.8-pre1
| -rw-r--r-- | .github/workflows/build-win.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 2 | ||||
| -rw-r--r-- | backend/src/plugin.py | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index 1ce47d4a..e425c77f 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -44,10 +44,10 @@ jobs: run: pnpm run build - name: Build Python Backend 🛠️ - run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin;/plugin" --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin;/plugin" --hidden-import=logging.handlers --hidden-import=sqlite3 ./backend/main.py - name: Build Python Backend (noconsole) 🛠️ - run: pyinstaller --noconfirm --noconsole --onefile --name "PluginLoader_noconsole" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin;/plugin" --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --noconsole --onefile --name "PluginLoader_noconsole" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin;/plugin" --hidden-import=logging.handlers --hidden-import=sqlite3 ./backend/main.py - name: Upload package artifact ⬆️ uses: actions/upload-artifact@v3 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d617db3..dfc97e3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,7 @@ jobs: run: pnpm run build - name: Build Python Backend 🛠️ - run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/locales:/locales --add-data ./backend/src/legacy:/src/legacy --add-data ./plugin:/plugin --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/locales:/locales --add-data ./backend/src/legacy:/src/legacy --add-data ./plugin:/plugin --hidden-import=logging.handlers --hidden-import=sqlite3 ./backend/main.py - name: Upload package artifact ⬆️ if: ${{ !env.ACT }} diff --git a/backend/src/plugin.py b/backend/src/plugin.py index 3d5d95db..b57bc5f7 100644 --- a/backend/src/plugin.py +++ b/backend/src/plugin.py @@ -80,7 +80,9 @@ class PluginWrapper: syspath.append(path.join(environ["DECKY_PLUGIN_DIR"], "py_modules")) #TODO: FIX IN A LESS CURSED WAY - sysmodules.update(sysmodules["src"].__dict__) + keys = [key.replace("src.", "") for key in sysmodules if key.startswith("src.")] + for key in keys: + sysmodules[key] = sysmodules["src"].__dict__[key] spec = spec_from_file_location("_", self.file) assert spec is not None |
