Skip to content

Commit b7186f7

Browse files
committed
install GDAL package form PyPI
1 parent a9f7a8d commit b7186f7

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,14 @@ jobs:
110110
run: |
111111
sudo apt-get update
112112
sudo add-apt-repository ppa:ubuntugis/ppa
113-
sudo apt-get install -y -qq gdal-bin libgdal-dev python3-gdal
113+
sudo apt-get install -y -qq gdal-bin libgdal-dev
114114
115115
- name: Install Python Dependencies
116116
run: |
117117
python -m pip install --upgrade pip
118-
pip install -r requirements.txt
119-
pip install -r requirements-dev.txt
118+
python -m pip install gdal=="$(gdal-config --version).*"
119+
python -m pip install -r requirements.txt
120+
python -m pip install -r requirements-dev.txt
120121
121122
- name: Run Django migrations
122123
run: |

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ RUN apt-get update && \
2121
RUN apt-get update && \
2222
apt-get install -y -qq software-properties-common && \
2323
add-apt-repository ppa:ubuntugis/ppa && \
24-
apt-get install -y -qq gdal-bin libgdal-dev python3-gdal
24+
25+
RUN pip install gdal=="$(gdal-config --version).*"
2526

2627
RUN mkdir -p /code
2728

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,13 @@ source .venv/bin/activate
111111
# Confirm Python path
112112
which python
113113

114-
# Instal GDAL and the Python GDAL bindings, see Dockerfile for example on Ubuntu
114+
# Install GDAL
115115
gdalinfo --version
116116

117-
# Install non-GDAL Python dependencies
117+
# Install gdal Pyhton library matching your GDAL version
118+
pip install gdal=="$(gdal-config --version).*"
119+
120+
# Install Python dependencies
118121
pip install -r requirements.txt
119122

120123
# create local DB container (once)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Note that GDAL is installed in Dockerfile to match the binary GDAL version
1+
#gdal=="$(gdal-config --version).*"
22
arrow==1.3.0
33
asgiref==3.8.1
44
blessed==1.20.0

0 commit comments

Comments
 (0)