Skip to content

Commit ce42474

Browse files
committed
Dockerfile: Backport Python detection fix for 3.10 and above
1 parent cbdf0dc commit ce42474

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ RUN git clone --depth 1 --recurse-submodules --shallow-submodules \
2323
WORKDIR /usr/src/vim
2424
# "backport" https://github.com/vim/vim/commit/16d7eced1a08565a9837db8067c7b9db5ed68854
2525
RUN sed -i -e '/#\s*undef _POSIX_THREADS/d' src/if_python3.c
26+
27+
# "backport" https://github.com/vim/vim/commit/23c0192166760b0d73bd39252ca72e3cfe596f6e
28+
# This fixes Python3 detection for Python 3.10 and above
29+
RUN sed -i -e 's/import sys; print(sys\.version\[:3\])/import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))/' src/configure.ac src/auto/configure
30+
2631
RUN ./configure --prefix=/opt/vim --enable-pythoninterp=yes --enable-python3interp=yes --enable-gui=gtk3
2732
RUN make -j$(nproc)
2833
RUN make install

0 commit comments

Comments
 (0)