mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 18:37:58 +00:00
mostly remove php-cgi requirement
This is now only needed for BDD tests against the php API.
This commit is contained in:
@@ -92,16 +92,6 @@ if (BUILD_API OR BUILD_IMPORTER)
|
||||
else()
|
||||
message (STATUS "Using PHP binary " ${PHP_BIN})
|
||||
endif()
|
||||
if (NOT PHPCGI_BIN)
|
||||
find_program (PHPCGI_BIN php-cgi)
|
||||
endif()
|
||||
# sanity check if PHP binary exists
|
||||
if (NOT EXISTS ${PHPCGI_BIN})
|
||||
message(WARNING "php-cgi binary not found. nominatim tool will not provide query functions.")
|
||||
set (PHPCGI_BIN "")
|
||||
else()
|
||||
message (STATUS "Using php-cgi binary " ${PHPCGI_BIN})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -10,5 +10,4 @@ from nominatim import version
|
||||
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
||||
|
||||
exit(cli.nominatim(module_dir='@NOMINATIM_LIBDIR@/module',
|
||||
osm2pgsql_path='@NOMINATIM_LIBDIR@/osm2pgsql',
|
||||
phpcgi_path='@PHPCGI_BIN@'))
|
||||
osm2pgsql_path='@NOMINATIM_LIBDIR@/osm2pgsql'))
|
||||
|
||||
@@ -10,5 +10,4 @@ from nominatim import version
|
||||
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
||||
|
||||
exit(cli.nominatim(module_dir='@CMAKE_BINARY_DIR@/module',
|
||||
osm2pgsql_path='@CMAKE_BINARY_DIR@/osm2pgsql/osm2pgsql',
|
||||
phpcgi_path='@PHPCGI_BIN@'))
|
||||
osm2pgsql_path='@CMAKE_BINARY_DIR@/osm2pgsql/osm2pgsql'))
|
||||
|
||||
@@ -56,7 +56,6 @@ For running Nominatim:
|
||||
* [PHP](https://php.net) (7.3+)
|
||||
* PHP-pgsql
|
||||
* PHP-intl (bundled with PHP)
|
||||
* PHP-cgi (for running queries from the command line)
|
||||
|
||||
For running continuous updates:
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@ sys.path.append('@PROJECT_SOURCE_DIR@')
|
||||
from nominatim.cli import get_set_parser
|
||||
|
||||
def get_parser():
|
||||
parser = get_set_parser(phpcgi_path='@PHPCGI_BIN@')
|
||||
parser = get_set_parser()
|
||||
|
||||
return parser.parser
|
||||
|
||||
@@ -101,7 +101,6 @@ class CommandlineParser:
|
||||
self.parser.print_help()
|
||||
return 1
|
||||
|
||||
args.phpcgi_path = Path(kwargs['phpcgi_path'])
|
||||
args.project_dir = Path(args.project_dir).resolve()
|
||||
|
||||
if 'cli_args' not in kwargs:
|
||||
|
||||
@@ -44,7 +44,6 @@ class NominatimArgs:
|
||||
# Basic environment set by root program.
|
||||
config: Configuration
|
||||
project_dir: Path
|
||||
phpcgi_path: Path
|
||||
|
||||
# Global switches
|
||||
version: bool
|
||||
|
||||
@@ -305,7 +305,6 @@ class NominatimEnvironment:
|
||||
cli.nominatim(module_dir='',
|
||||
osm2pgsql_path=str(self.build_dir / 'osm2pgsql' / 'osm2pgsql'),
|
||||
cli_args=cmdline,
|
||||
phpcgi_path='',
|
||||
environ=self.test_env)
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ def cli_call(src_dir):
|
||||
def _call_nominatim(*args):
|
||||
return nominatim.cli.nominatim(module_dir='MODULE NOT AVAILABLE',
|
||||
osm2pgsql_path='OSM2PGSQL NOT AVAILABLE',
|
||||
phpcgi_path='/usr/bin/php-cgi',
|
||||
cli_args=args)
|
||||
|
||||
return _call_nominatim
|
||||
|
||||
@@ -20,7 +20,6 @@ export DEBIAN_FRONTEND=noninteractive #DOCS:
|
||||
|
||||
# Now you can install all packages needed for Nominatim:
|
||||
|
||||
sudo apt install -y php-cgi
|
||||
sudo apt install -y build-essential cmake g++ libboost-dev libboost-system-dev \
|
||||
libboost-filesystem-dev libexpat1-dev zlib1g-dev \
|
||||
libbz2-dev libpq-dev liblua5.3-dev lua5.3 lua-dkjson \
|
||||
|
||||
@@ -20,7 +20,6 @@ export DEBIAN_FRONTEND=noninteractive #DOCS:
|
||||
|
||||
# Now you can install all packages needed for Nominatim:
|
||||
|
||||
sudo apt install -y php-cgi
|
||||
sudo apt install -y build-essential cmake g++ libboost-dev libboost-system-dev \
|
||||
libboost-filesystem-dev libexpat1-dev zlib1g-dev \
|
||||
libbz2-dev libpq-dev liblua5.3-dev lua5.3 lua-dkjson \
|
||||
|
||||
Reference in New Issue
Block a user