summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-04-20 13:40:42 +0200
committerFlorian Dold <florian@dold.me>2021-04-20 13:40:42 +0200
commita284905936dbbb7a5698f7b4a85d3af2cc45cc1f (patch)
treebb7af0526a941ce5913681b6428995b9784ec287
parent3b9139a8f30a5a59dc4ed8aa24acc959d01ce6b3 (diff)
downloadtaler-merchant-demos-a284905936dbbb7a5698f7b4a85d3af2cc45cc1f.tar.gz
taler-merchant-demos-a284905936dbbb7a5698f7b4a85d3af2cc45cc1f.tar.bz2
taler-merchant-demos-a284905936dbbb7a5698f7b4a85d3af2cc45cc1f.zip
factor out uwsgi arg
-rw-r--r--Makefile4
-rwxr-xr-xbin/taler-merchant-demos12
2 files changed, 9 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 10a2a01..25a2a5c 100644
--- a/Makefile
+++ b/Makefile
@@ -66,7 +66,7 @@ sass-setup:
@echo "This is the initial sass-installation/setup script."
@echo "This setup must run as root, on a machine that has NPM installed!"
@echo "If your password is requested (for escalation), please enter it."
- sudo npm install -g sass
+ npm install -g sass
.PHONY: scss-setup
scss-setup: sass-setup
@@ -75,7 +75,7 @@ scss-setup: sass-setup
sass-build:
@echo "Warning: If Sass/Scss is not installed, please run \`make sass-setup\` first!"
@echo "This script will only convert files inside /static"
- sass talermerchantdemos/static:talermerchantdemos/static
+ sass --update talermerchantdemos/static:talermerchantdemos/static
.PHONY: scss-build
scss-build: sass-build
diff --git a/bin/taler-merchant-demos b/bin/taler-merchant-demos
index feb4e4d..b252bb6 100755
--- a/bin/taler-merchant-demos
+++ b/bin/taler-merchant-demos
@@ -33,6 +33,11 @@ LOGGER = logging.getLogger(__name__)
# No perfect match to our logging format, but good enough ...
UWSGI_LOGFMT = "%(ltime) %(proto) %(method) %(uri) %(proto) => %(status)"
+# Argument to tell uWSGI to load the python plugin.
+# This hack is required, because on systems where the plugin is statically linked,
+# loading it causes an error.
+arg_load_python = "--if-not-plugin python --plugins python --endif".split(" ")
+
##
# This function interprets the 'serve-uwsgi' subcommand.
# The effect is to launch the blog UWSGI service. This
@@ -45,6 +50,7 @@ def handle_serve_uwsgi(config, which_shop):
params = [
"uwsgi",
"uwsgi",
+ *arg_load_python,
"--master",
"--die-on-term",
"--log-format",
@@ -91,11 +97,7 @@ def handle_serve_http(config, which_shop, port=None):
os.execlp(
"uwsgi",
"uwsgi",
- "--if-not-plugin",
- "python",
- "--plugins",
- "python",
- "--endif",
+ *arg_load_python,
"--master",
"--die-on-term",
"--log-format",