X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/09f4d767e4498368f798d8c1b579b1bf730f4baf..76b1885595df885cab439372c72f45c9e5c01471:/nominatim/clicmd/setup.py diff --git a/nominatim/clicmd/setup.py b/nominatim/clicmd/setup.py index 71980739..100fdf67 100644 --- a/nominatim/clicmd/setup.py +++ b/nominatim/clicmd/setup.py @@ -6,11 +6,11 @@ from pathlib import Path import psutil -from ..tools.exec_utils import run_legacy_script -from ..db.connection import connect -from ..db import status, properties -from ..version import NOMINATIM_VERSION -from ..errors import UsageError +from nominatim.tools.exec_utils import run_legacy_script +from nominatim.db.connection import connect +from nominatim.db import status, properties +from nominatim.version import NOMINATIM_VERSION +from nominatim.errors import UsageError # Do not repeat documentation of subcommand classes. # pylint: disable=C0111 @@ -39,11 +39,11 @@ class SetupAll: group.add_argument('--reverse-only', action='store_true', help='Do not create tables and indexes for searching') group.add_argument('--no-partitions', action='store_true', - help="""Do not partition search indices - (speeds up import of single country extracts)""") + help=("Do not partition search indices " + "(speeds up import of single country extracts)")) group.add_argument('--no-updates', action='store_true', - help="""Do not keep tables that are only needed for - updating the database later""") + help="Do not keep tables that are only needed for " + "updating the database later") group = parser.add_argument_group('Expert options') group.add_argument('--ignore-errors', action='store_true', help='Continue import even when errors in SQL are present') @@ -130,8 +130,8 @@ class SetupAll: database_import.create_search_indices(conn, args.config, args.sqllib_dir, drop=args.no_updates) - run_legacy_script('setup.php', '--create-country-names', - nominatim_env=args, throw_on_fail=not args.ignore_errors) + LOG.warning('Create search index for default country names.') + database_import.create_country_names(conn, args.config) webdir = args.project_dir / 'website' LOG.warning('Setup website at %s', webdir)