Skip to content

Commit

Permalink
Support overriding python3 detection
Browse files Browse the repository at this point in the history
Also mention it in the README.
  • Loading branch information
eapache committed Aug 10, 2016
1 parent a425095 commit 96f636f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ Requirements

- Optional, required for Unicode support: ICU (Ubuntu: package `libicu-dev`).

Python 3 Support
----------------

If your Vim is compiled against Python 3 instead (`+python3` flag) the install
script should detect this in most cases and everything should just work. You may
need different python headers installed (e.g. `python3-dev` on Ubuntu).

If the detection does not work for any reason you can set `PY3=ON` or `PY3=OFF`
as appropriate when running `./install.sh` to override it.

Installation
------------

Expand Down
10 changes: 6 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ set -o errexit
set -o nounset
set -o pipefail

if vim --version | grep -q +python3; then
PY3="ON"
else
PY3="OFF"
if [ -z ${PY3+x} ]; then
if vim --version | grep -q +python3; then
PY3="ON"
else
PY3="OFF"
fi
fi

mkdir -p build
Expand Down

0 comments on commit 96f636f

Please sign in to comment.