From: Sarah Hoffmann Date: Sat, 13 Jul 2024 20:34:16 +0000 (+0200) Subject: fix dependencies and adapt documentation for psycopg3 X-Git-Tag: deploy~4^2~8^2~1 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/221b5cd8a2c80866c4b9c51e3f66487bf855bc47?ds=sidebyside fix dependencies and adapt documentation for psycopg3 --- diff --git a/.github/actions/build-nominatim/action.yml b/.github/actions/build-nominatim/action.yml index 17ff0ccf..d601fc7b 100644 --- a/.github/actions/build-nominatim/action.yml +++ b/.github/actions/build-nominatim/action.yml @@ -27,9 +27,9 @@ runs: run: | sudo apt-get install -y -qq libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libbz2-dev libpq-dev libproj-dev libicu-dev liblua${LUA_VERSION}-dev lua${LUA_VERSION} lua-dkjson nlohmann-json3-dev libspatialite7 libsqlite3-mod-spatialite if [ "$FLAVOUR" == "oldstuff" ]; then - pip3 install MarkupSafe==2.0.1 python-dotenv psycopg2==2.7.7 jinja2==2.8 psutil==5.4.2 pyicu==2.9 osmium PyYAML==5.1 sqlalchemy==1.4.31 datrie asyncpg aiosqlite + pip3 install MarkupSafe==2.0.1 python-dotenv jinja2==2.8 psutil==5.4.2 pyicu==2.9 osmium PyYAML==5.1 sqlalchemy==1.4.31 psycopg==3.1.7 datrie asyncpg aiosqlite else - sudo apt-get install -y -qq python3-icu python3-datrie python3-pyosmium python3-jinja2 python3-psutil python3-psycopg2 python3-dotenv python3-yaml + sudo apt-get install -y -qq python3-icu python3-datrie python3-pyosmium python3-jinja2 python3-psutil python3-dotenv python3-yaml pip3 install sqlalchemy psycopg aiosqlite fi shell: bash diff --git a/docs/admin/Installation.md b/docs/admin/Installation.md index a2f1a084..9159ac62 100644 --- a/docs/admin/Installation.md +++ b/docs/admin/Installation.md @@ -36,19 +36,15 @@ For running Nominatim: Furthermore the following Python libraries are required: - * [Psycopg2](https://www.psycopg.org) (2.7+) + * [Psycopg3](https://www.psycopg.org) * [Python Dotenv](https://github.com/theskumar/python-dotenv) * [psutil](https://github.com/giampaolo/psutil) * [Jinja2](https://palletsprojects.com/p/jinja/) - * [SQLAlchemy](https://www.sqlalchemy.org/) (1.4.31+ with greenlet support) - * one of - * [psycopg3](https://www.psycopg.org) - * [asyncpg](https://magicstack.github.io/asyncpg) (0.8+) * [PyICU](https://pypi.org/project/PyICU/) * [PyYaml](https://pyyaml.org/) (5.1+) * [datrie](https://github.com/pytries/datrie) -These will be installed automatically, when using pip installation. +These will be installed automatically when using pip installation. When using legacy CMake-based installation: @@ -69,6 +65,8 @@ For running continuous updates: For running the Python frontend: + * [SQLAlchemy](https://www.sqlalchemy.org/) (1.4.31+ with greenlet support) + * [asyncpg](https://magicstack.github.io/asyncpg) (0.8+, only when using SQLAlchemy < 2.0) * one of the following web frameworks: * [falcon](https://falconframework.org/) (3.0+) * [starlette](https://www.starlette.io/) diff --git a/packaging/nominatim-db/pyproject.toml b/packaging/nominatim-db/pyproject.toml index 112f5a29..841845f0 100644 --- a/packaging/nominatim-db/pyproject.toml +++ b/packaging/nominatim-db/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ "Operating System :: OS Independent", ] dependencies = [ - "psycopg[pool]", + "psycopg", "python-dotenv", "jinja2", "pyYAML>=5.1", diff --git a/vagrant/Install-on-Ubuntu-22.sh b/vagrant/Install-on-Ubuntu-22.sh index 9d8642a6..aa23128a 100755 --- a/vagrant/Install-on-Ubuntu-22.sh +++ b/vagrant/Install-on-Ubuntu-22.sh @@ -26,7 +26,7 @@ export DEBIAN_FRONTEND=noninteractive #DOCS: nlohmann-json3-dev postgresql-14-postgis-3 \ postgresql-contrib-14 postgresql-14-postgis-3-scripts \ libicu-dev python3-dotenv \ - python3-psycopg2 python3-psutil python3-jinja2 \ + python3-psycopg python3-psutil python3-jinja2 \ python3-sqlalchemy python3-asyncpg \ python3-icu python3-datrie python3-yaml git