Changeset 5c9c247 for src/mapservice/codegen
- Timestamp:
- Apr 10, 2020, 7:50:13 PM (7 years ago)
- Branches:
- debian/bullseye, master
- Children:
- a2b8052
- Parents:
- ae2ff15
- Location:
- src/mapservice/codegen
- Files:
-
- 3 edited
-
code_generator (modified) (2 diffs)
-
templates/__init__test.mustache (modified) (1 diff)
-
templates/__main__.mustache (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/mapservice/codegen/code_generator
rae2ff15 r5c9c247 57 57 chmod +x "${CELERY_WORKER_SCRIPT}" 58 58 59 # bash script to install gnuboat_common from this repository before other dependencies 59 60 echo "#!/bin/bash" > "${TOX_INSTALL_COMMAND}" 60 61 echo 'pip install --editable=file:///`pwd`/../../common' >> "${TOX_INSTALL_COMMAND}" … … 62 63 chmod 0755 "${TOX_INSTALL_COMMAND}" 63 64 64 echo "include gnuboat_mapservice/openapi/*.yaml gnuboat_mapservice/templates/*" > "${SRC_GEN}/MANIFEST.in" 65 # create MANIFEST.in to package openapi-spec and templates 66 echo "include gnuboat_mapservice/openapi/*.yaml" > "${SRC_GEN}/MANIFEST.in" 67 echo "graft gnuboat_mapservice/templates" >> "${SRC_GEN}/MANIFEST.in" 68 echo "global-exclude *.pyc" >> "${SRC_GEN}/MANIFEST.in" 65 69 66 70 ######## -
src/mapservice/codegen/templates/__init__test.mustache
rae2ff15 r5c9c247 28 28 29 29 application.config.from_object('{{packageName}}.server_impl.Config.TestingConfig') 30 application.template_folder = os.path.join(os.path.dirname(__file__), '../templates') 30 31 celery = Celery(__name__, broker=application.config['CELERY_BROKER_URL']) 31 32 celery.config_from_object(application.config) -
src/mapservice/codegen/templates/__main__.mustache
rae2ff15 r5c9c247 6 6 {{/supportPython2}} 7 7 8 import os 9 8 10 from {{packageName}}.server_impl import app, application, mail, celery, setup_app, config_object 9 11 10 12 def main(): 11 setup_app('{{appName}}', config_object )13 setup_app('{{appName}}', config_object, template_folder = os.path.join(os.path.dirname(__file__), 'templates')) 12 14 app.run(host=application.config.get("HOST", "localhost"), port=application.config.get("PORT", {{serverPort}})) 13 15
Note:
See TracChangeset
for help on using the changeset viewer.
