File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,15 @@ def test_uuid_ossp_extension(tmp_postgres):
2525def test_xml2_extension (tmp_postgres ):
2626 pgdata , con_str = tmp_postgres
2727 postgresql .psql (f'-d "{ con_str } " -c "CREATE EXTENSION xml2;"' )
28+
29+
30+ def test_postgis_extension (tmp_postgres ):
31+ pgdata , con_str = tmp_postgres
32+ postgresql .psql (f'-d "{ con_str } " -c "CREATE EXTENSION postgis;"' )
33+ postgresql .psql (f'-d "{ con_str } " -c "CREATE EXTENSION postgis_raster;"' )
34+ postgresql .psql (f'-d "{ con_str } " -c "CREATE EXTENSION postgis_topology;"' )
35+ postgresql .psql (f'-d "{ con_str } " -c "CREATE EXTENSION postgis_sfcgal;"' )
36+ postgresql .psql (f'-d "{ con_str } " -c "CREATE EXTENSION fuzzystrmatch;"' )
37+ postgresql .psql (f'-d "{ con_str } " -c "CREATE EXTENSION address_standardizer;"' )
38+ postgresql .psql (f'-d "{ con_str } " -c "CREATE EXTENSION address_standardizer_data_us;"' )
39+ postgresql .psql (f'-d "{ con_str } " -c "CREATE EXTENSION postgis_tiger_geocoder;"' )
Original file line number Diff line number Diff line change 55else
66 VERSION=13.4
77fi
8+ JOBS_NUMBER=4
9+ POSTGIS_VERSION=3.2.0
810
911export DEBIAN_FRONTEND=noninteractive
1012
1113sudo apt update
12- sudo apt install -y zlib1g-dev libreadline-dev libossp-uuid-dev libxml2-dev libxslt1-dev curl make gcc
13- curl -L -O https://ftp.postgresql.org/pub/source/v${VERSION} /postgresql-${VERSION} .tar.gz
14+ sudo apt install -y zlib1g-dev libreadline-dev libossp-uuid-dev libxml2-dev \
15+ libxslt1-dev curl make gcc pkg-config libgeos-dev libxml2-utils \
16+ libjson-c-dev proj-bin g++ libsqlite3-dev libtiff-dev \
17+ libcurl4-gnutls-dev libprotobuf-c-dev libgdal-dev libsfcgal-dev \
18+ libproj-dev protobuf-c-compiler
1419
20+ # Build Postgresql
21+ curl -L -O https://ftp.postgresql.org/pub/source/v${VERSION} /postgresql-${VERSION} .tar.gz
1522tar -xzf postgresql-${VERSION} .tar.gz
1623cd postgresql-${VERSION}
1724./configure --prefix=` pwd` /../src/postgresql --with-ossp-uuid --with-libxml --with-libxslt
18- make -j 4 world-bin
25+ make -j ${JOBS_NUMBER} world-bin
1926make install-world-bin
2027cd ..
2128
29+ # Build PostGIS
30+ curl -L -O https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VERSION} .tar.gz
31+ tar -xzvf postgis-${POSTGIS_VERSION} .tar.gz
32+ cd postgis-${POSTGIS_VERSION}
33+ ./configure --with-pgconfig=` pwd` /../src/postgresql/bin/pg_config
34+ make -j ${JOBS_NUMBER}
35+ make install
36+ cd ..
You can’t perform that action at this time.
0 commit comments