0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.0.1385: Python 3.5 is getting old

Problem:    Python 3.5 is getting old.
Solution:   Make Python 3.6 the default. (Ken Takata, closes #2429)
This commit is contained in:
Bram Moolenaar 2017-12-10 18:17:44 +01:00
parent 74240d3feb
commit 59eb016dff
6 changed files with 39 additions and 11 deletions

View File

@ -736,8 +736,8 @@ or 'pythonthreedll' option can be also used to specify the Python DLL.
The name of the DLL should match the Python version Vim was compiled with. The name of the DLL should match the Python version Vim was compiled with.
Currently the name for Python 2 is "python27.dll", that is for Python 2.7. Currently the name for Python 2 is "python27.dll", that is for Python 2.7.
That is the default value for 'pythondll'. For Python 3 it is python35.dll That is the default value for 'pythondll'. For Python 3 it is python36.dll
(Python 3.5). To know for sure edit "gvim.exe" and search for (Python 3.6). To know for sure edit "gvim.exe" and search for
"python\d*.dll\c". "python\d*.dll\c".

View File

@ -438,18 +438,31 @@ You will end up with a Python-enabled, Win32 version. Enjoy!
================================ ================================
For building with MSVC 2008 the "Windows Installer" from www.python.org For building with MSVC 2008 the "Windows Installer" from www.python.org
works fine. Python 3.4 is recommended. works fine. Python 3.6 is recommended.
When building, you need to set the following variables at least: When building, you need to set the following variables at least:
PYTHON3: Where Python3 is installed. E.g. C:\Python34 PYTHON3: Where Python3 is installed. E.g. C:\Python36
DYNAMIC_PYTHON3: Whether dynamic linking is used. Usually, set to yes. DYNAMIC_PYTHON3: Whether dynamic linking is used. Usually, set to yes.
PYTHON3_VER: Python3 version. E.g. 34 for Python 3.4.X. PYTHON3_VER: Python3 version. E.g. 36 for Python 3.6.X.
E.g. When using MSVC (as one line): E.g. When using MSVC (as one line):
nmake -f Make_mvc.mak nmake -f Make_mvc.mak
PYTHON3=C:\Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34 PYTHON3=C:\Python36 DYNAMIC_PYTHON3=yes PYTHON3_VER=36
When using msys2 and link with Python3 bundled with msys2 (as one line):
mingw32-make -f Make_ming.mak PYTHON3=c:/msys64/mingw64
PYTHON3_HOME=c:/msys64/mingw64
PYTHON3INC=-Ic:/msys64/mingw64/include/python3.6m
DYNAMIC_PYTHON3=yes
PYTHON3_VER=36
DYNAMIC_PYTHON3_DLL=libpython3.6m.dll
STATIC_STDCPLUS=yes
(This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.)
8. Building with Racket or MzScheme support 8. Building with Racket or MzScheme support
@ -684,21 +697,33 @@ config.h and Ruby's DLL name. Here are the steps for working around them:
There is no need to build whole Ruby, just config.h is needed. There is no need to build whole Ruby, just config.h is needed.
If you use 32-bit MSVC 2015, the config.h is generated in the If you use 32-bit MSVC 2015, the config.h is generated in the
.ext\include\i386-mswin32_140 directory. .ext\include\i386-mswin32_140 directory.
If you use 64-bit MSVC 2015, the config.h is generated in the
.ext\include\x64-mswin64_140 directory.
3) Install the generated config.h. 3) Install the generated config.h.
For 32-bit version:
xcopy /s .ext\include C:\Ruby24\include\ruby-2.4.0 xcopy /s .ext\include C:\Ruby24\include\ruby-2.4.0
For 64-bit version:
xcopy /s .ext\include C:\Ruby24-x64\include\ruby-2.4.0
Note that 2.4.0 is Ruby API version of Ruby 2.4.X. Note that 2.4.0 is Ruby API version of Ruby 2.4.X.
You may need to close the console and reopen it to pick up the new $PATH. You may need to close the console and reopen it to pick up the new $PATH.
4) Build Vim. Note that you need to adjust some variables (as one line): 4) Build Vim. Note that you need to adjust some variables (as one line):
For 32-bit version:
nmake -f Make_mvc.mak nmake -f Make_mvc.mak
RUBY=C:\Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 RUBY=C:\Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0
RUBY_MSVCRT_NAME=msvcrt RUBY_MSVCRT_NAME=msvcrt
WINVER=0x501 WINVER=0x501
For 64-bit version, replace RUBY=C:\Ruby24 with RUBY=C:\Ruby24-x64.
If you set WINVER explicitly, it must be set to >=0x500, when building If you set WINVER explicitly, it must be set to >=0x500, when building
with Ruby 2.1 or later. (Default is 0x501.) with Ruby 2.1 or later. (Default is 0x501.)
When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt
@ -713,6 +738,7 @@ After you install RubyInstaller, just type this (as one line):
RUBY=C:/Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 RUBY=C:/Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0
WINVER=0x501 WINVER=0x501
For 64-bit version, replace RUBY=C:/Ruby24 with RUBY=C:/Ruby24-x64.
If you set WINVER explicitly, it must be set to >=0x500, when building with If you set WINVER explicitly, it must be set to >=0x500, when building with
Ruby 2.1 or later. (Default is 0x501.) Ruby 2.1 or later. (Default is 0x501.)

View File

@ -316,14 +316,14 @@ endif
# Python3 interface: # Python3 interface:
# PYTHON3=[Path to Python3 directory] (Set inside Make_cyg.mak or Make_ming.mak) # PYTHON3=[Path to Python3 directory] (Set inside Make_cyg.mak or Make_ming.mak)
# DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically) # DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically)
# PYTHON3_VER=[Python3 version, eg 31, 32] (default is 35) # PYTHON3_VER=[Python3 version, eg 31, 32] (default is 36)
ifdef PYTHON3 ifdef PYTHON3
ifndef DYNAMIC_PYTHON3 ifndef DYNAMIC_PYTHON3
DYNAMIC_PYTHON3=yes DYNAMIC_PYTHON3=yes
endif endif
ifndef PYTHON3_VER ifndef PYTHON3_VER
PYTHON3_VER=35 PYTHON3_VER=36
endif endif
ifndef DYNAMIC_PYTHON3_DLL ifndef DYNAMIC_PYTHON3_DLL
DYNAMIC_PYTHON3_DLL=python$(PYTHON3_VER).dll DYNAMIC_PYTHON3_DLL=python$(PYTHON3_VER).dll

View File

@ -67,7 +67,7 @@
# Python3 interface: # Python3 interface:
# PYTHON3=[Path to Python3 directory] # PYTHON3=[Path to Python3 directory]
# DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically) # DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically)
# PYTHON3_VER=[Python3 version, eg 30, 31] (default is 35) # PYTHON3_VER=[Python3 version, eg 30, 31] (default is 36)
# #
# Ruby interface: # Ruby interface:
# RUBY=[Path to Ruby directory] # RUBY=[Path to Ruby directory]
@ -906,7 +906,7 @@ PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
# PYTHON3 interface # PYTHON3 interface
!ifdef PYTHON3 !ifdef PYTHON3
!ifndef PYTHON3_VER !ifndef PYTHON3_VER
PYTHON3_VER = 35 PYTHON3_VER = 36
!endif !endif
!message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)" !message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)"
!if "$(DYNAMIC_PYTHON3)" == "yes" !if "$(DYNAMIC_PYTHON3)" == "yes"

View File

@ -1,5 +1,5 @@
:: command to build big Vim with OLE, Lua, Perl, Python, Racket, Ruby and Tcl :: command to build big Vim with OLE, Lua, Perl, Python, Racket, Ruby and Tcl
SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\" SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\"
SET TOOLDIR=E:\ SET TOOLDIR=E:\
%VCDIR%nmake -f Make_mvc.mak GUI=yes OLE=yes LUA=%TOOLDIR%lua53 DYNAMIC_LUA=yes LUA_VER=53 PERL=%TOOLDIR%perl524 DYNAMIC_PERL=yes PERL_VER=524 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python35 DYNAMIC_PYTHON3=yes PYTHON3_VER=35 MZSCHEME=%TOOLDIR%Racket DYNAMIC_MZSCHEME=yes MZSCHEME_VER=3m_a36fs8 RUBY=%TOOLDIR%ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 RUBY_MSVCRT_NAME=msvcrt TCL=%TOOLDIR%ActiveTcl TCL_VER=86 TCL_VER_LONG=8.6 DYNAMIC_TCL=yes TCL_DLL=tcl86t.dll %1 IME=yes CSCOPE=yes DIRECTX=yes %VCDIR%nmake -f Make_mvc.mak GUI=yes OLE=yes LUA=%TOOLDIR%lua53 DYNAMIC_LUA=yes LUA_VER=53 PERL=%TOOLDIR%perl524 DYNAMIC_PERL=yes PERL_VER=524 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python36 DYNAMIC_PYTHON3=yes PYTHON3_VER=36 MZSCHEME=%TOOLDIR%Racket DYNAMIC_MZSCHEME=yes MZSCHEME_VER=3m_a36fs8 RUBY=%TOOLDIR%ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 RUBY_MSVCRT_NAME=msvcrt TCL=%TOOLDIR%ActiveTcl TCL_VER=86 TCL_VER_LONG=8.6 DYNAMIC_TCL=yes TCL_DLL=tcl86t.dll %1 IME=yes CSCOPE=yes DIRECTX=yes

View File

@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1385,
/**/ /**/
1384, 1384,
/**/ /**/