Compare commits

...

1 commit

Author SHA1 Message Date
Luis Finke
229c2aa079
Add simple support for dependent python modules (#11)
* add pipinstall script and append py_modules to PYTHONPATH

allows dependent python modules to be installed

* separate build_frontend and pip_install

* use prepare script for installing python modules

* use pip3 instead of pip

* always create requirements.txt, even if empty
2023-01-05 15:37:38 -08:00
3 changed files with 7 additions and 0 deletions

1
.gitignore vendored
View file

@ -22,6 +22,7 @@ coverage
# Dependency directory # Dependency directory
node_modules node_modules
bower_components bower_components
py_modules
# Editors # Editors
.idea .idea

View file

@ -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 import logging
logging.basicConfig(filename="/tmp/template.log", logging.basicConfig(filename="/tmp/template.log",

View file

@ -3,6 +3,7 @@
"version": "0.0.1", "version": "0.0.1",
"description": "A template to quickly create decky plugins from scratch, based on TypeScript and webpack", "description": "A template to quickly create decky plugins from scratch, based on TypeScript and webpack",
"scripts": { "scripts": {
"prepare": "touch requirements.txt && pip3 install --upgrade -r requirements.txt -t py_modules",
"build": "shx rm -rf dist && rollup -c", "build": "shx rm -rf dist && rollup -c",
"watch": "rollup -c -w", "watch": "rollup -c -w",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"