Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537606 - app-editors/vim-7.4.273, app-editors/gvim-7.4.273: only one version python interpreter enabled
Summary: app-editors/vim-7.4.273, app-editors/gvim-7.4.273: only one version python in...
Status: RESOLVED DUPLICATE of bug 537176
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-24 21:42 UTC by Marnix Kaart
Modified: 2015-01-25 08:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marnix Kaart 2015-01-24 21:42:07 UTC
Vim and gvim have support for a both a python2 and a python3 interpreter that allows the user to run python commands by typing :py or :py3 respectively. Some vim plugins also need this functionality. It seems that only one interpreter is enabled at a time due to the PYTHON_SINGLE_TARGET USE flag. However, it should be possible to enable both versions of the python interpreter at the same time as far as I know.

On my system I have the following USE flags related to python for vim:

 + + python                         : Add optional support/bindings for the Python language
 - - python_single_target_python2_7 : Build for Python 2.7 only
 + + python_single_target_python3_3 : Build for Python 3.3 only
 - - python_single_target_python3_4 : Build for Python 3.4 only
 + + python_targets_python2_7       : Build with Python 2.7
 + + python_targets_python3_3       : Build with Python 3.3
 - - python_targets_python3_4       : Build with Python 3.4

The command :version from within vim shows -python +python3, which indicates that only the python3 interpreter is enabled. The following works:

:py3 print("test")

but the following does not:

:py print("test")

The following error is printed:

E319: Sorry, the command is not available in this version

I've tried to come up with a small patch to fix this issue, I'm not sure if it will break something else, since I'm no expert at writing ebuilds. Also, upon a later rebuild it stopped working and I only could use the python (not the python3) interpreter. So I think the fix is not very robust. Please see this forum thread for my simple and apparently failed attempt at fixing this: http://forums.gentoo.org/viewtopic.php?p=7686844

I hope this is enough information to address this issue.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-25 08:36:01 UTC

*** This bug has been marked as a duplicate of bug 537176 ***