mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +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()
|
else()
|
||||||
message (STATUS "Using PHP binary " ${PHP_BIN})
|
message (STATUS "Using PHP binary " ${PHP_BIN})
|
||||||
endif()
|
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()
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -10,5 +10,4 @@ from nominatim import version
|
|||||||
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
||||||
|
|
||||||
exit(cli.nominatim(module_dir='@NOMINATIM_LIBDIR@/module',
|
exit(cli.nominatim(module_dir='@NOMINATIM_LIBDIR@/module',
|
||||||
osm2pgsql_path='@NOMINATIM_LIBDIR@/osm2pgsql',
|
osm2pgsql_path='@NOMINATIM_LIBDIR@/osm2pgsql'))
|
||||||
phpcgi_path='@PHPCGI_BIN@'))
|
|
||||||
|
|||||||
@@ -10,5 +10,4 @@ from nominatim import version
|
|||||||
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
||||||
|
|
||||||
exit(cli.nominatim(module_dir='@CMAKE_BINARY_DIR@/module',
|
exit(cli.nominatim(module_dir='@CMAKE_BINARY_DIR@/module',
|
||||||
osm2pgsql_path='@CMAKE_BINARY_DIR@/osm2pgsql/osm2pgsql',
|
osm2pgsql_path='@CMAKE_BINARY_DIR@/osm2pgsql/osm2pgsql'))
|
||||||
phpcgi_path='@PHPCGI_BIN@'))
|
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ For running Nominatim:
|
|||||||
* [PHP](https://php.net) (7.3+)
|
* [PHP](https://php.net) (7.3+)
|
||||||
* PHP-pgsql
|
* PHP-pgsql
|
||||||
* PHP-intl (bundled with PHP)
|
* PHP-intl (bundled with PHP)
|
||||||
* PHP-cgi (for running queries from the command line)
|
|
||||||
|
|
||||||
For running continuous updates:
|
For running continuous updates:
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ sys.path.append('@PROJECT_SOURCE_DIR@')
|
|||||||
from nominatim.cli import get_set_parser
|
from nominatim.cli import get_set_parser
|
||||||
|
|
||||||
def get_parser():
|
def get_parser():
|
||||||
parser = get_set_parser(phpcgi_path='@PHPCGI_BIN@')
|
parser = get_set_parser()
|
||||||
|
|
||||||
return parser.parser
|
return parser.parser
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ class CommandlineParser:
|
|||||||
self.parser.print_help()
|
self.parser.print_help()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
args.phpcgi_path = Path(kwargs['phpcgi_path'])
|
|
||||||
args.project_dir = Path(args.project_dir).resolve()
|
args.project_dir = Path(args.project_dir).resolve()
|
||||||
|
|
||||||
if 'cli_args' not in kwargs:
|
if 'cli_args' not in kwargs:
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ class NominatimArgs:
|
|||||||
# Basic environment set by root program.
|
# Basic environment set by root program.
|
||||||
config: Configuration
|
config: Configuration
|
||||||
project_dir: Path
|
project_dir: Path
|
||||||
phpcgi_path: Path
|
|
||||||
|
|
||||||
# Global switches
|
# Global switches
|
||||||
version: bool
|
version: bool
|
||||||
|
|||||||
@@ -305,7 +305,6 @@ class NominatimEnvironment:
|
|||||||
cli.nominatim(module_dir='',
|
cli.nominatim(module_dir='',
|
||||||
osm2pgsql_path=str(self.build_dir / 'osm2pgsql' / 'osm2pgsql'),
|
osm2pgsql_path=str(self.build_dir / 'osm2pgsql' / 'osm2pgsql'),
|
||||||
cli_args=cmdline,
|
cli_args=cmdline,
|
||||||
phpcgi_path='',
|
|
||||||
environ=self.test_env)
|
environ=self.test_env)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ def cli_call(src_dir):
|
|||||||
def _call_nominatim(*args):
|
def _call_nominatim(*args):
|
||||||
return nominatim.cli.nominatim(module_dir='MODULE NOT AVAILABLE',
|
return nominatim.cli.nominatim(module_dir='MODULE NOT AVAILABLE',
|
||||||
osm2pgsql_path='OSM2PGSQL NOT AVAILABLE',
|
osm2pgsql_path='OSM2PGSQL NOT AVAILABLE',
|
||||||
phpcgi_path='/usr/bin/php-cgi',
|
|
||||||
cli_args=args)
|
cli_args=args)
|
||||||
|
|
||||||
return _call_nominatim
|
return _call_nominatim
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ export DEBIAN_FRONTEND=noninteractive #DOCS:
|
|||||||
|
|
||||||
# Now you can install all packages needed for Nominatim:
|
# 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 \
|
sudo apt install -y build-essential cmake g++ libboost-dev libboost-system-dev \
|
||||||
libboost-filesystem-dev libexpat1-dev zlib1g-dev \
|
libboost-filesystem-dev libexpat1-dev zlib1g-dev \
|
||||||
libbz2-dev libpq-dev liblua5.3-dev lua5.3 lua-dkjson \
|
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:
|
# 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 \
|
sudo apt install -y build-essential cmake g++ libboost-dev libboost-system-dev \
|
||||||
libboost-filesystem-dev libexpat1-dev zlib1g-dev \
|
libboost-filesystem-dev libexpat1-dev zlib1g-dev \
|
||||||
libbz2-dev libpq-dev liblua5.3-dev lua5.3 lua-dkjson \
|
libbz2-dev libpq-dev liblua5.3-dev lua5.3 lua-dkjson \
|
||||||
|
|||||||
Reference in New Issue
Block a user