gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-merchant-demos] branch master updated: sub-commands not rea


From: gnunet
Subject: [taler-taler-merchant-demos] branch master updated: sub-commands not really needed
Date: Wed, 22 Jul 2020 15:37:11 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository taler-merchant-demos.

The following commit(s) were added to refs/heads/master by this push:
     new 4c9812b  sub-commands not really needed
4c9812b is described below

commit 4c9812bd177fd7133b5ae8dc1d1f6807985dcd7a
Author: MS <ms@taler.net>
AuthorDate: Wed Jul 22 15:36:52 2020 +0200

    sub-commands not really needed
---
 bin/.taler-merchant-demos.swp | Bin 20480 -> 20480 bytes
 bin/taler-merchant-demos      |  25 +++++++++----------------
 setup.py                      |  12 ++++++------
 3 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/bin/.taler-merchant-demos.swp b/bin/.taler-merchant-demos.swp
index 3f5655a..ec5e758 100644
Binary files a/bin/.taler-merchant-demos.swp and 
b/bin/.taler-merchant-demos.swp differ
diff --git a/bin/taler-merchant-demos b/bin/taler-merchant-demos
index 42fe35a..8f8df21 100755
--- a/bin/taler-merchant-demos
+++ b/bin/taler-merchant-demos
@@ -77,26 +77,19 @@ def handle_serve_http(config, whichShop, port=None):
               "--http", spec,
               "--module", "talermerchantdemos.{}:app".format(whichShop))
 
-@click.group(help="Global launcher of Taler demo stores")
+@click.command()
 @click.option("--config", help="Configuration file", required=False)
-@click.pass_context
-def cli(ctx, config):
-    if config:
-        os.environ["TALER_CONFIG_FILE"] = config
-    config_obj = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE"))
-    ctx.obj = dict(config=config_obj)
-
-@cli.command(help="Run the blog")
-@click.pass_obj
 @click.option("--serve-http", help="Serve via HTTP", is_flag=True, 
required=False)
 @click.option("--port", help="HTTP port to serve (if not given, it's picked 
from config)", required=False, type=int)
 @click.option("--serve-uwsgi", help="Serve via UWSGI (default)", 
required=False)
-def blog(obj, serve_http, port, serve_uwsgi):
-    assert(obj.get("config"))
-
+@click.argument("whichShop")
+def demos(config, serve_http, port, serve_uwsgi, whichShop):
+    if config:
+        os.environ["TALER_CONFIG_FILE"] = config
+    config_obj = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE"))
     if serve_http: # port was given
-        handle_serve_http(obj["config"], "blog", port)
+        handle_serve_http(config_obj, whichShop, port)
         return
-    handle_serve_uwsgi(obj["config"], "blog")
+    handle_serve_uwsgi(config_obj, whichShop)
 
-cli()
+demos()
diff --git a/setup.py b/setup.py
index ea2e79d..0ab84de 100755
--- a/setup.py
+++ b/setup.py
@@ -4,8 +4,8 @@ setup(name='talermerchantdemos',
       version='0.6.0pre1',
       description='Example blog/donations/survey sites for GNU Taler',
       url='git://taler.net/taler-merchant-demos',
-      author='Marcello Stanisci',
-      author_email='ms@taler.net',
+      author=['Marcello Stanisci', 'Florian Dold'],
+      author_email=['ms@taler.net', 'florian@dold.me'],
       license='GPL',
       packages=find_packages(),
       install_requires=["Flask>=0.10",
@@ -21,11 +21,11 @@ setup(name='talermerchantdemos',
               "blog/templates/*.html",
               "blog/static/*.svg",
               "blog/static/*.css",
-              "blog/static/web-common/*.png",
-              "blog/static/web-common/*.css",
-              "blog/static/web-common/*.html",
               "blog/articles/*",
-              "blog/data/*"
+              "blog/data/*",
+              "donations/templates/*.html",
+              "donations/static/*.svg",
+              "donations/static/*.css"
           ]
       },
       scripts=['./bin/taler-merchant-demos'],

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]