1 # SPDX-License-Identifier: GPL-3.0-or-later
3 # This file is part of Nominatim. (https://nominatim.org)
5 # Copyright (C) 2025 by the Nominatim developer community.
6 # For a full list of authors see the git log.
11 def osm2pgsql_options(temp_db, tmp_path):
12 """ A standard set of options for osm2pgsql
13 together with a osm2pgsql mock that just reflects the command line.
15 osm2pgsql_exec = tmp_path / 'osm2pgsql_mock'
17 osm2pgsql_exec.write_text("""#!/bin/sh
19 if [ "$*" = "--version" ]; then
20 >&2 echo "2024-08-09 11:16:23 osm2pgsql version 11.7.2 (11.7.2)"
25 osm2pgsql_exec.chmod(0o777)
27 return dict(osm2pgsql=str(osm2pgsql_exec),
29 osm2pgsql_style='style.file',
31 dsn='dbname=' + temp_db,
33 tablespaces=dict(slim_data='', slim_index='',
34 main_data='', main_index=''))