diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-01-31 21:49:05 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-01-31 21:49:05 +0100 |
commit | 94073167e3aa8cbe18380e93a2fc8e8165438cc8 (patch) | |
tree | 2e7c3078ffc53518b95979a118b16403699381ae /runtime | |
parent | 1dd45fb4f3371f0256653b2186c8b4b3d26b3f41 (diff) |
patch 8.0.1451: difficult to set the python home directories properlyv8.0.1451
Problem: It is difficult to set the python home directory properly for
Python 2.7 and 3.5 since both use $PYTHONHOME.
Solution: Add the 'pythonhome' and 'pythonthreehome' options. (Kazuki
Sakamoto, closes #1266)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/options.txt | 28 | ||||
-rw-r--r-- | runtime/doc/quickref.txt | 2 | ||||
-rw-r--r-- | runtime/optwin.vim | 8 |
3 files changed, 38 insertions, 0 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index f933083559..75e4f97416 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5967,6 +5967,20 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + *'pythonhome'* +'pythonhome' string (default "") + global + {not in Vi} + {only available when compiled with the |+python/dyn| + feature} + Specifies the name of the Python 2.x home directory. When 'pythonhome' + and the PYTHONHOME environment variable are not set, PYTHON_HOME, + which was specified at compile time, will be used for the Python 2.x + home directory. + Environment variables are expanded |:set_env|. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'pythonthreedll'* 'pythonthreedll' string (default depends on the build) global @@ -5979,6 +5993,20 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + *'pythonthreehome'* +'pythonthreehome' string (default "") + global + {not in Vi} + {only available when compiled with the |+python3/dyn| + feature} + Specifies the name of the Python 3 home directory. When + 'pythonthreehome' and the PYTHONHOME environment variable are not set, + PYTHON3_HOME, which was specified at compile time, will be used for + the Python 3 home directory. + Environment variables are expanded |:set_env|. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'pyxversion'* *'pyx'* 'pyxversion' 'pyx' number (default depends on the build) global diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 06ae663bfa..516a1daf56 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -839,7 +839,9 @@ Short explanation of each option: *option-list* 'prompt' 'prompt' enable prompt in Ex mode 'pumheight' 'ph' maximum height of the popup menu 'pythondll' name of the Python 2 dynamic library +'pythonhome' name of the Python 2 home directory 'pythonthreedll' name of the Python 3 dynamic library +'pythonthreehome' name of the Python 3 home directory 'pyxversion' 'pyx' Python version used for pyx* commands 'quoteescape' 'qe' escape characters used in a string 'readonly' 'ro' disallow writing the buffer diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 74ebc9fd98..a417295fde 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1354,10 +1354,18 @@ if exists("&pythondll") call append("$", "pythondll\tname of the Python 2 dynamic library") call <SID>OptionG("pythondll", &pythondll) endif +if exists("&pythonhome") + call append("$", "pythonhome\tname of the Python 2 home directory") + call <SID>OptionG("pythonhome", &pythonhome) +endif if exists("&pythonthreedll") call append("$", "pythonthreedll\tname of the Python 3 dynamic library") call <SID>OptionG("pythonthreedll", &pythonthreedll) endif +if exists("&pythonthreehome") + call append("$", "pythonthreehome\tname of the Python 3 home directory") + call <SID>OptionG("pythonthreehome", &pythonthreehome) +endif if exists("&rubydll") call append("$", "rubydll\tname of the Ruby dynamic library") call <SID>OptionG("rubydll", &rubydll) |