Skip to content

Commit

Permalink
fix dependencies and adapt documentation for psycopg3
Browse files Browse the repository at this point in the history
  • Loading branch information
lonvia committed Jul 29, 2024
1 parent 9659afb commit 221b5cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build-nominatim/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions docs/admin/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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/)
Expand Down
2 changes: 1 addition & 1 deletion packaging/nominatim-db/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"psycopg[pool]",
"psycopg",
"python-dotenv",
"jinja2",
"pyYAML>=5.1",
Expand Down
2 changes: 1 addition & 1 deletion vagrant/Install-on-Ubuntu-22.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 221b5cd

Please sign in to comment.