X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ae8694a6a6862d7cb66cd91102d2802c9899e7cf..2c61fe08a031bd4ccbe47c62c021321e2dff7510:/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 fc3a7465..2d048bcb 100644 --- a/src/nominatim_db/tools/exec_utils.py +++ b/src/nominatim_db/tools/exec_utils.py @@ -2,7 +2,7 @@ # # This file is part of Nominatim. (https://nominatim.org) # -# Copyright (C) 2024 by the Nominatim developer community. +# Copyright (C) 2025 by the Nominatim developer community. # For a full list of authors see the git log. """ Helper functions for executing external programs. @@ -39,7 +39,10 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None: 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'): @@ -82,7 +85,7 @@ def _mk_tablespace_options(ttype: str, options: Mapping[str, Any]) -> List[str]: def _find_osm2pgsql_cmd(cmdline: Optional[str]) -> str: - if cmdline is not None: + if cmdline: return cmdline in_path = shutil.which('osm2pgsql')