Skip to content

Commit 8bccdf4

Browse files
[CI] Dockerfiles are updated (cleanup) (#327)
We will use pythonX -m venv ... instead python virtualenv utility. * [CI] run_tests.sh uses "pythonX -m venv ..." * [CI] altlinux does not install python virtualenv * [CI] ubuntu 24_04 does not install python3-virtualenv * [CI] std/std-all do not install py-virtualenv * [CI] altlinux dockerfiles are updated (cleanup) * [CI] fix: ubuntu 24.04 requires python3-venv and build-essential * [CI] run_tests.sh sets VIRTUAL_ENV_DISABLE_PROMPT=1 (restored)
1 parent 909fe08 commit 8bccdf4

File tree

6 files changed

+4
-30
lines changed

6 files changed

+4
-30
lines changed

Dockerfile--altlinux_10.tmpl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,8 @@ RUN ln -s /pg/postgres/install/lib/libpq.so.5.17 /usr/lib64/libpq.so.5
6464
FROM base1_with_pg-${PG_VERSION} as base2_with_python-3
6565
RUN apt-get install -y python3
6666
RUN apt-get install -y python3-dev
67-
RUN apt-get install -y python3-module-virtualenv
6867
RUN apt-get install -y python3-modules-sqlite3
6968

70-
# AltLinux does not have "generic" virtualenv utility. Let's create it.
71-
RUN if [[ -f "/usr/bin/virtualenv" ]] ; then \
72-
echo AAA; \
73-
elif [[ -f "/usr/bin/virtualenv3" ]] ; then \
74-
ln -s /usr/bin/virtualenv3 /usr/bin/virtualenv; \
75-
else \
76-
echo "/usr/bin/virtualenv is not created!"; \
77-
exit 1; \
78-
fi
79-
8069
ENV PYTHON_VERSION=3
8170

8271
# --------------------------------------------- final
@@ -101,8 +90,6 @@ RUN mkdir -p ~/.ssh
10190
#
10291
# Altlinux 10 and 11 too slowly create a new SSH connection (x6).
10392
#
104-
# So, we exclude the "remote" tests until this problem has been resolved.
105-
#
10693

10794
ENTRYPOINT sh -c " \
10895
set -eux; \

Dockerfile--altlinux_11.tmpl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,8 @@ RUN ln -s /pg/postgres/install/lib/libpq.so.5.17 /usr/lib64/libpq.so.5
6767
FROM base1_with_pg-${PG_VERSION} as base2_with_python-3
6868
RUN apt-get install -y python3
6969
RUN apt-get install -y python3-dev
70-
RUN apt-get install -y python3-module-virtualenv
7170
RUN apt-get install -y python3-modules-sqlite3
7271

73-
# AltLinux does not have "generic" virtualenv utility. Let's create it.
74-
RUN if [[ -f "/usr/bin/virtualenv" ]] ; then \
75-
echo AAA; \
76-
elif [[ -f "/usr/bin/virtualenv3" ]] ; then \
77-
ln -s /usr/bin/virtualenv3 /usr/bin/virtualenv; \
78-
else \
79-
echo "/usr/bin/virtualenv is not created!"; \
80-
exit 1; \
81-
fi
82-
8372
ENV PYTHON_VERSION=3
8473

8574
# --------------------------------------------- final
@@ -104,8 +93,6 @@ RUN mkdir -p ~/.ssh
10493
#
10594
# Altlinux 10 and 11 too slowly create a new SSH connection (x6).
10695
#
107-
# So, we exclude the "remote" tests until this problem has been resolved.
108-
#
10996

11097
ENTRYPOINT sh -c " \
11198
set -eux; \

Dockerfile--std-all.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM postgres:${PG_VERSION}-alpine as base1
66

77
# --------------------------------------------- base2_with_python-3
88
FROM base1 as base2_with_python-3
9-
RUN apk add --no-cache curl python3 python3-dev build-base musl-dev linux-headers py-virtualenv
9+
RUN apk add --no-cache curl python3 python3-dev build-base musl-dev linux-headers
1010
ENV PYTHON_VERSION=3
1111

1212
# --------------------------------------------- final

Dockerfile--std.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM postgres:${PG_VERSION}-alpine as base1
66

77
# --------------------------------------------- base2_with_python-3
88
FROM base1 as base2_with_python-3
9-
RUN apk add --no-cache curl python3 python3-dev build-base musl-dev linux-headers py-virtualenv
9+
RUN apk add --no-cache curl python3 python3-dev build-base musl-dev linux-headers
1010
ENV PYTHON_VERSION=3
1111

1212
# --------------------------------------------- final

Dockerfile--ubuntu_24_04.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ RUN sh -c "echo postgres ALL=NOPASSWD:/usr/sbin/service ssh start" >> /etc/sudoe
4141

4242
# --------------------------------------------- base2_with_python-3
4343
FROM base1 as base2_with_python-3
44-
RUN apt install -y python3 python3-dev python3-virtualenv libpq-dev
44+
RUN apt install -y python3 python3-dev python3-venv libpq-dev build-essential
4545
ENV PYTHON_VERSION=3
4646

4747
# --------------------------------------------- final

run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ command -v pg_config
1313
# prepare python environment
1414
VENV_PATH="/tmp/testgres_venv"
1515
rm -rf $VENV_PATH
16-
virtualenv --python="/usr/bin/python${PYTHON_VERSION}" "${VENV_PATH}"
16+
python${PYTHON_VERSION} -m venv "${VENV_PATH}"
1717
export VIRTUAL_ENV_DISABLE_PROMPT=1
1818
source "${VENV_PATH}/bin/activate"
1919
pip install -r tests/requirements.txt

0 commit comments

Comments
 (0)