X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e92e03e2e6b892e6dc7a931fe0e70de9315bd302..8b1cabebd653b7c338d84bf289d40156e90b4e05:/src/nominatim_db/tools/exec_utils.py diff --git a/src/nominatim_db/tools/exec_utils.py b/src/nominatim_db/tools/exec_utils.py index 4cbbf95d..7629e2a2 100644 --- a/src/nominatim_db/tools/exec_utils.py +++ b/src/nominatim_db/tools/exec_utils.py @@ -35,11 +35,14 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None: '--number-processes', '1' if options['append'] else str(options['threads']), '--cache', str(options['osm2pgsql_cache']), '--style', str(options['osm2pgsql_style']) - ] + ] if str(options['osm2pgsql_style']).endswith('.lua'): env['LUA_PATH'] = ';'.join((str(options['osm2pgsql_style_path'] / '?.lua'), - os.environ.get('LUAPATH', ';'))) + os.environ.get('LUA_PATH', ';'))) + env['THEMEPARK_PATH'] = str(options['osm2pgsql_style_path'] / 'themes') + if 'THEMEPARK_PATH' in os.environ: + env['THEMEPARK_PATH'] += ':' + os.environ['THEMEPARK_PATH'] cmd.extend(('--output', 'flex')) for flavour in ('data', 'index'): @@ -50,7 +53,6 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None: cmd.extend(('--output', 'gazetteer', '--hstore', '--latlon')) cmd.extend(_mk_tablespace_options('main', options)) - if options['flatnode_file']: cmd.extend(('--flat-nodes', options['flatnode_file']))