@@ -15,23 +15,39 @@ set backspace+=indent,eol,start
1515set langmenu = none
1616
1717" Python2
18- " MacVim uses Homebrew python2 if installed, otherwise configured one
18+ " MacVim is configured by default to use the pre-installed System python2
19+ " version. However, following code tries to find a Homebrew, MacPorts or
20+ " an installation from python.org:
1921if exists (" &pythondll" ) && exists (" &pythonhome" )
20- if filereadable (" /usr/local/Frameworks/Python.framework/Versions/2.7/Python" )
22+ if filereadable (" /usr/local/Library/ Frameworks/Python.framework/Versions/2.7/Python" )
2123 " Homebrew python 2.7
2224 set pythondll = /usr/ local/Frameworks/ Python.framework/Versions/ 2.7 /Python
2325 set pythonhome = /usr/ local/Frameworks/ Python.framework/Versions/ 2.7
26+ elseif filereadable (" /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python" )
27+ " MacPorts python 2.7
28+ set pythondll = /opt/ local/Library/ Frameworks/Python.framework/ Versions/2.7/ Python
29+ set pythonhome = /opt/ local/Library/ Frameworks/Python.framework/ Versions/2.7
30+ elseif filereadable (" /Library/Frameworks/Python.framework/Versions/2.7/Python" )
31+ " https://www.python.org/downloads/mac-osx/
32+ set pythonthreedll = /Library/ Frameworks/Python.framework/ Versions/2.7/ Python
33+ set pythonthreehome = /Library/ Frameworks/Python.framework/ Versions/2.7
2434 endif
2535endif
2636
2737" Python3
28- " MacVim uses Homebrew python3 if installed, next try to use python.org binary
38+ " MacVim is configured by default to use Homebrew python3 version
39+ " If this cannot be found, following code tries to find a MacPorts
40+ " or an installation from python.org:
2941if exists (" &pythonthreedll" ) && exists (" &pythonthreehome" ) &&
3042 \ ! filereadable (&pythonthreedll )
31- if filereadable (" /Library/Frameworks/Python.framework/Versions/3.6/Python" )
43+ if filereadable (" /opt/local/Library/Frameworks/Python.framework/Versions/3.7/Python" )
44+ " MacPorts python 3.7
45+ set pythonthreedll = /opt/ local/Library/ Frameworks/Python.framework/ Versions/3.7/ Python
46+ set pythonthreehome = /opt/ local/Library/ Frameworks/Python.framework/ Versions/3.7
47+ elseif filereadable (" /Library/Frameworks/Python.framework/Versions/3.7/Python" )
3248 " https://www.python.org/downloads/mac-osx/
33- set pythonthreedll = /Library/ Frameworks/Python.framework/ Versions/3.6 / Python
34- set pythonthreehome = /Library/ Frameworks/Python.framework/ Versions/3.6
49+ set pythonthreedll = /Library/ Frameworks/Python.framework/ Versions/3.7 / Python
50+ set pythonthreehome = /Library/ Frameworks/Python.framework/ Versions/3.7
3551 endif
3652endif
3753
0 commit comments