diff --git a/kallithea/lib/paster_commands/make_config.py b/kallithea/lib/paster_commands/make_config.py --- a/kallithea/lib/paster_commands/make_config.py +++ b/kallithea/lib/paster_commands/make_config.py @@ -125,7 +125,6 @@ def _run(args): # use default that cannot be replaced tmpl_stored_args.update({ 'uuid': lambda: uuid.uuid4().hex, - 'here': os.path.dirname(os.path.abspath(args.config_file)), }) try: # built in template diff --git a/kallithea/lib/paster_commands/template.ini.mako b/kallithea/lib/paster_commands/template.ini.mako --- a/kallithea/lib/paster_commands/template.ini.mako +++ b/kallithea/lib/paster_commands/template.ini.mako @@ -2,6 +2,8 @@ <%text>################################################################################ <%text>################################################################################ # Kallithea - config file generated with kallithea-config # +# # +# The %(here)s variable will be replaced with the parent directory of this file# <%text>################################################################################ <%text>################################################################################ @@ -182,15 +184,15 @@ static_files = true <%text>## Available Languages: <%text>## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW lang = -cache_dir = ${here}/data -index_dir = ${here}/data/index +cache_dir = %(here)s/data +index_dir = %(here)s/data/index <%text>## perform a full repository scan on each server start, this should be <%text>## set to false after first startup, to allow faster server restarts. initial_repo_scan = false <%text>## uncomment and set this path to use archive download cache -archive_cache_dir = ${here}/tarballcache +archive_cache_dir = %(here)s/tarballcache <%text>## change this to unique ID for security app_instance_uuid = ${uuid()} @@ -337,8 +339,8 @@ celery.always.eager = false <%text>### BEAKER CACHE #### <%text>#################################### -beaker.cache.data_dir = ${here}/data/cache/data -beaker.cache.lock_dir = ${here}/data/cache/lock +beaker.cache.data_dir = %(here)s/data/cache/data +beaker.cache.lock_dir = %(here)s/data/cache/lock beaker.cache.regions = short_term,long_term,sql_cache_short @@ -494,7 +496,7 @@ logview.pylons.util = #eee %if database_engine == 'sqlite': # SQLITE [default] -sqlalchemy.url = sqlite:///${here}/kallithea.db?timeout=60 +sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 %elif database_engine == 'postgres': # POSTGRESQL diff --git a/scripts/generate-ini.py b/scripts/generate-ini.py --- a/scripts/generate-ini.py +++ b/scripts/generate-ini.py @@ -21,7 +21,6 @@ selected_mako_conditionals = set([ mako_variable_values = { 'host': '127.0.0.1', 'port': '5000', - 'here': '%(here)s', 'uuid()': '${app_instance_uuid}', } @@ -32,8 +31,6 @@ ini_files = [ Kallithea - config for tests: sqlalchemy and kallithea_test.sqlite custom logging - - The %(here)s variable will be replaced with the parent directory of this file ''', { '[server:main]': { @@ -72,8 +69,6 @@ ini_files = [ initial_repo_scan = true debug = true verbose and colorful logging - - The %(here)s variable will be replaced with the parent directory of this file ''', { '[server:main]': {