Changeset - 495dea7c2a13
[Not reviewed]
default
1 3 1
Thomas De Schampheleire - 5 years ago 2020-10-06 20:18:40
thomas.de_schampheleire@nokia.com
ini: get rid of path 'paster_commands'

We are no longer using 'paster'. The location of the template.ini.make file
is a leftover from old times.
4 files changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
MANIFEST.in
Show inline comments
 
@@ -9,23 +9,22 @@ include           LICENSE.md
 
include           MIT-Permissive-License.txt
 
include           README.rst
 
include           conftest.py
 
include           dev_requirements.txt
 
include           development.ini
 
include           pytest.ini
 
include           requirements.txt
 
include           tox.ini
 
recursive-include docs *
 
recursive-include init.d *
 
recursive-include kallithea/alembic *
 
include           kallithea/bin/ldap_sync.conf
 
include           kallithea/lib/paster_commands/template.ini.mako
 
recursive-include kallithea/front-end *
 
recursive-include kallithea/i18n *
 
recursive-include kallithea/public *
 
recursive-include kallithea/templates *
 
recursive-include kallithea/tests/fixtures *
 
recursive-include kallithea/tests/scripts *
 
include           kallithea/tests/models/test_dump_html_mails.ref.html
 
include           kallithea/tests/performance/test_vcs.py
 
include           kallithea/tests/vcs/aconfig
 
recursive-include scripts *
kallithea/lib/inifile.py
Show inline comments
 
@@ -23,25 +23,25 @@ other custom values.
 
import logging
 
import os
 
import re
 

	
 
import mako.template
 

	
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
template_file = os.path.join(
 
    os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
 
    'kallithea/lib/paster_commands/template.ini.mako')
 
    'kallithea/templates/ini/template.ini.mako')
 

	
 
default_variables = {
 
    'database_engine': 'sqlite',
 
    'http_server': 'waitress',
 
    'host': '127.0.0.1',
 
    'port': '5000',
 
    'uuid': lambda: 'VERY-SECRET',
 
    'version': '',
 
}
 

	
 
variable_options = {
 
    'database_engine': ['sqlite', 'postgres', 'mysql'],
kallithea/templates/ini/template.ini.mako
Show inline comments
 
file renamed from kallithea/lib/paster_commands/template.ini.mako to kallithea/templates/ini/template.ini.mako
scripts/generate-ini.py
Show inline comments
 
#!/usr/bin/env python3
 
"""
 
Based on kallithea/lib/paster_commands/template.ini.mako, generate development.ini
 
Generate development.ini based on the ini template.
 
"""
 

	
 
import re
 

	
 
from kallithea.lib import inifile
 

	
 

	
 
# files to be generated from the mako template
 
ini_files = [
 
    ('development.ini',
 
        {
 
            '[server:main]': {
0 comments (0 inline, 0 general)