mirror of
https://github.com/SteamDeckHomebrew/decky-plugin-template.git
synced 2025-11-03 07:42:25 -06:00
add pipinstall script and append py_modules to PYTHONPATH
allows dependent python modules to be installed
This commit is contained in:
parent
e2b4542b58
commit
561751e028
3 changed files with 8 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -22,6 +22,7 @@ coverage
|
|||
# Dependency directory
|
||||
node_modules
|
||||
bower_components
|
||||
py_modules
|
||||
|
||||
# Editors
|
||||
.idea
|
||||
|
|
|
|||
5
main.py
5
main.py
|
|
@ -1,3 +1,8 @@
|
|||
import os
|
||||
import sys
|
||||
# append py_modules to PYTHONPATH
|
||||
sys.path.append(os.path.dirname(os.path.realpath(__file__))+"/py_modules")
|
||||
|
||||
import logging
|
||||
|
||||
logging.basicConfig(filename="/tmp/template.log",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
"version": "0.0.1",
|
||||
"description": "A template to quickly create decky plugins from scratch, based on TypeScript and webpack",
|
||||
"scripts": {
|
||||
"build": "shx rm -rf dist && rollup -c",
|
||||
"pipinstall": "if [ -f requirements.txt ]; then\n\tpip install -U -r requirements.txt -t py_modules\nfi",
|
||||
"build": "pnpm run pipinstall && shx rm -rf dist && rollup -c",
|
||||
"watch": "rollup -c -w",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue