pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/52742: vim package can't use Python3



>Number:         52742
>Category:       pkg
>Synopsis:       vim package can't use Python3
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 20 19:45:00 +0000 2017
>Originator:     Jonathan Buschmann
>Release:        trunk
>Organization:
>Environment:
macOS High Sierra 10.13
>Description:
If you set the current default Python to a 3.x version, Vim doesn't have the ability to use Python3 binding

example set in mk.conf

PYTHON_VERSION_DEFAULT= 36

examine vim --version output it wouldn't list python

Also even though Vim can be linked to both Python2 and Python3 at the same time, I don't see how it would package in 'pkgsrc'

The fix below allow to link to Python3 it may not be the prettiest change but it gets the work done, feel free to modify it.
>How-To-Repeat:

>Fix:
diff --git i/editors/vim-share/options.mk w/editors/vim-share/options.mk
index d4956b41ec5..8d412e1da8a 100644
--- i/editors/vim-share/options.mk
+++ w/editors/vim-share/options.mk
@@ -13,9 +13,14 @@ CONFIGURE_ENV+=		vi_cv_path_ruby=${RUBY}
 
 .if !empty(PKG_OPTIONS:Mpython)
 .include "../../lang/python/pyversion.mk"
+.if !empty(_PYTHON_VERSION:M3*)
+CONFIGURE_ARGS+=	--enable-python3interp
+CONFIGURE_ENV+=		vi_cv_path_python3=${PYTHONBIN}
+.else
 CONFIGURE_ARGS+=	--enable-pythoninterp
 CONFIGURE_ENV+=		vi_cv_path_python=${PYTHONBIN}
 .endif
+.endif
 
 .if !empty(PKG_OPTIONS:Mperl)
 .include "../../lang/perl5/buildlink3.mk"


Home | Main Index | Thread Index | Old Index