Skip to content

Commit 5798836

Browse files
authored
fix manual build (#41)
1 parent a76d126 commit 5798836

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

grass-gis-manual-docker/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ FROM osgeo/grass-gis:releasebranch_8_4-alpine
33
ARG ADDON_NAME
44
ARG GITHUB_REPOSITORY
55

6+
RUN apk add gcc make python3-dev musl-dev linux-headers
7+
68
WORKDIR /src
79
COPY . /src
810

9-
RUN apk add gcc make python3-dev musl-dev linux-headers
10-
1111
# create environment to install requirements
12-
RUN python -m venv addon-env
12+
RUN python -m venv --system-site-packages addon-env
1313
ENV PATH="/src/addon-env/bin:$PATH"
14+
# --system-site-packages only works for active virtual environment.
15+
# To use paths, below hack is needed..
16+
RUN export VERSION=$(python -c \
17+
"import sys;print(f\"python{sys.version_info.major}.{sys.version_info.minor}\")"); \
18+
echo "/usr/lib/$VERSION/site-packages/" > /src/addon-env/lib/$VERSION/site-packages/system-packages.pth
1419
RUN test -e requirements.txt && pip3 install -r requirements.txt || echo "No requirements.txt"
1520

1621
# Compile GRASS GIS addon

0 commit comments

Comments
 (0)