File tree Expand file tree Collapse file tree 7 files changed +34
-10
lines changed Expand file tree Collapse file tree 7 files changed +34
-10
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ updates:
10
10
schedule :
11
11
interval : " daily"
12
12
13
+ # Configuration for pyproj
14
+ - package-ecosystem : " pip"
15
+ directory : " /scripts/"
16
+ schedule :
17
+ interval : " weekly"
18
+
19
+ # GitHub actions themselves
13
20
- package-ecosystem : " github-actions"
14
21
directory : " /"
15
22
schedule :
Original file line number Diff line number Diff line change
1
+ 3.12
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ ENV DEST_DIR=/home/dist
14
14
WORKDIR /home/
15
15
16
16
COPY conf .
17
+ COPY .python-version .
17
18
RUN /home/install.sh
18
19
19
20
COPY templates ./templates
Original file line number Diff line number Diff line change 1
1
gcc
2
2
git
3
- software-properties-common
4
- python3.10
5
- python3-dev
6
- python3-distutils
7
- python3-venv
8
- python3-apt
3
+ python${python_version}
4
+ python${python_version}-venv
5
+ python${python_version}-dev
9
6
python3-pip
Original file line number Diff line number Diff line change @@ -4,23 +4,34 @@ set -Eeuo pipefail
4
4
TZ=Europe/Berlin
5
5
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
6
6
7
+ if [ -f " /home/.python-version" ]; then
8
+ python_version=` cat /home/.python-version`
9
+ else
10
+ python_version=3
11
+ fi
7
12
# install missing packages
8
13
PACKAGE_LIST=/home/apt-packages.txt
9
14
if [ -f " $PACKAGE_LIST " ]; then
10
15
apt-get update -qq > /dev/null
16
+ apt-get -qq --yes install software-properties-common
17
+ add-apt-repository --yes ppa:deadsnakes/ppa # for different python versions
18
+ apt-get update -qq > /dev/null
11
19
12
20
apt-get \
13
21
-qq --yes \
14
- --allow-downgrades \
15
22
--allow-remove-essential \
16
23
--allow-change-held-packages \
24
+ --no-install-recommends \
17
25
install \
18
- ` cat $PACKAGE_LIST ` > /dev/null
26
+ ` cat $PACKAGE_LIST | sed " s/ \\ ${python_version} / ${python_version} /p " ` > /dev/null
19
27
fi
20
28
21
29
# setup python environment
22
30
mkdir -p $VIRTUAL_ENV
23
- python3 -m venv $VIRTUAL_ENV
31
+ python${python_version} -m venv $VIRTUAL_ENV
32
+ . $VIRTUAL_ENV /bin/activate
33
+
34
+ python3 --version
24
35
25
36
# install pyproj
26
37
python3 -m pip install -q --upgrade pip
Original file line number Diff line number Diff line change
1
+ # we use requirements.txt to easily trigger dependabot
2
+ # but we do not install pyproj directly from pip.
3
+ # pyproj is "compiled" for the specific version of PROJ
4
+ # the file .python-version is needed to run properly with dependabot
5
+ pyproj == 3.7.1
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ test "$(ls -A $DIRNAME/dist/)" && rm -r $DIRNAME/dist/*
10
10
PROJ_VERSION=` cat $DIRNAME /Dockerfile | sed -n ' s/^FROM .*:\(.*\)$/\1/p' `
11
11
echo " PROJ_VERSION=$PROJ_VERSION "
12
12
13
- PYPROJ_VERSION=3.7.1
13
+ # extract PYPROJ version from requirements.txt
14
+ PYPROJ_VERSION=` cat $DIRNAME /requirements.txt | sed -n ' s/^pyproj==\(.*\)$/\1/p' `
15
+ echo " PYPROJ_VERSION=$PYPROJ_VERSION "
14
16
15
17
DOCKER_TAG=" crs-explorer:$PROJ_VERSION "
16
18
STOP_COUNTER=" ${1:- 0} "
You can’t perform that action at this time.
0 commit comments