@@ -4,6 +4,7 @@ ENV DEBIAN_FRONTEND=noninteractive
4
4
ENV PYTHON_CONFIGURE_OPTS="--enable-shared"
5
5
ENV PYENV_ROOT="/opt/pyenv"
6
6
ENV PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
7
+ ENV PYTHON_VERSION=3.13.0
7
8
8
9
# Install system dependencies for pyenv and Python builds
9
10
RUN apt-get update && apt-get install -yqq \
@@ -39,14 +40,19 @@ RUN git clone https://github.com/pyenv/pyenv.git $PYENV_ROOT && \
39
40
cd $PYENV_ROOT && \
40
41
git checkout $(git describe --tags --abbrev=0)
41
42
43
+ # Set up bash profile for pyenv
44
+ RUN echo 'export PYENV_ROOT="/opt/pyenv"' >> /root/.bashrc && \
45
+ echo 'export PATH="${PYENV_ROOT}/bin:${PYENV_ROOT}/shims:$PATH"' >> /root/.bashrc && \
46
+ echo 'eval "$(pyenv init -)"' >> /root/.bashrc && \
47
+ echo 'eval "$(pyenv init --path)"' >> /root/.bashrc && \
48
+ echo 'alias python=python3' >> /root/.bashrc
49
+
42
50
# Install Python versions with pyenv
43
51
RUN pyenv install 3.10.13 && \
44
52
pyenv install 3.11.9 && \
45
53
pyenv install 3.12.4 && \
46
54
pyenv install 3.13.0
47
55
48
- ENV PYTHON_VERSION=3.13.0
49
-
50
56
# Upgrade pip for each Python version
51
57
RUN for pyver in 3.10.13 3.11.9 3.12.4 3.13.0; do \
52
58
echo "Upgrading pip for Python $pyver..." && \
@@ -57,12 +63,7 @@ RUN for pyver in 3.10.13 3.11.9 3.12.4 3.13.0; do \
57
63
done
58
64
59
65
# Build and install Vim from source with Python support for each Python version
60
- RUN export PYENV_ROOT="/opt/pyenv" && \
61
- export PATH="${PYENV_ROOT}/bin:${PYENV_ROOT}/shims:${PATH}" && \
62
- eval "$(pyenv init -)" && \
63
- eval "$(pyenv init --path)" && \
64
- export PYTHON_CONFIGURE_OPTS="--enable-shared" && \
65
- cd /tmp && \
66
+ RUN cd /tmp && \
66
67
git clone https://github.com/vim/vim.git && \
67
68
cd vim && \
68
69
# Build Vim for each Python version
0 commit comments