Dockerfile: Backport Python detection fix for 3.10 and above

This commit is contained in:
Tomas Babej 2022-06-28 09:05:32 -04:00
parent cbdf0dc9a9
commit ce42474979

View file

@ -23,6 +23,11 @@ RUN git clone --depth 1 --recurse-submodules --shallow-submodules \
WORKDIR /usr/src/vim
# "backport" https://github.com/vim/vim/commit/16d7eced1a08565a9837db8067c7b9db5ed68854
RUN sed -i -e '/#\s*undef _POSIX_THREADS/d' src/if_python3.c
# "backport" https://github.com/vim/vim/commit/23c0192166760b0d73bd39252ca72e3cfe596f6e
# This fixes Python3 detection for Python 3.10 and above
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
RUN ./configure --prefix=/opt/vim --enable-pythoninterp=yes --enable-python3interp=yes --enable-gui=gtk3
RUN make -j$(nproc)
RUN make install