taler-merchant-demos

Python-based Frontends for the Demonstration Web site
Log | Files | Refs | Submodules | README | LICENSE

commit a284905936dbbb7a5698f7b4a85d3af2cc45cc1f
parent 3b9139a8f30a5a59dc4ed8aa24acc959d01ce6b3
Author: Florian Dold <florian@dold.me>
Date:   Tue, 20 Apr 2021 13:40:42 +0200

factor out uwsgi arg

Diffstat:
MMakefile | 4++--
Mbin/taler-merchant-demos | 12+++++++-----
2 files changed, 9 insertions(+), 7 deletions(-)

diff --git 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 @@ -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",