aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Walch <florian@fwalch.com>2015-09-27 00:27:44 +0200
committerFlorian Walch <florian@fwalch.com>2015-09-27 00:27:44 +0200
commitded4a502199b283ac7d1184db7eae250c1255ad0 (patch)
tree16fd65dbf76036164a82d73fefabe01daed3670f
parentdbb5f41c976c33dcefad5b0ae318a6edad574f02 (diff)
parenta3399f9a63bf6c7f5c13e7b6a82847f5af40c249 (diff)
downloadrneovim-ded4a502199b283ac7d1184db7eae250c1255ad0.tar.gz
rneovim-ded4a502199b283ac7d1184db7eae250c1255ad0.tar.bz2
rneovim-ded4a502199b283ac7d1184db7eae250c1255ad0.zip
Merge #3316 'Travis: Install Python 3 Neovim module'.
-rwxr-xr-x.ci/before_install.sh17
-rwxr-xr-x.ci/install.sh14
-rw-r--r--.travis.yml19
-rw-r--r--test/functional/provider/python3_spec.lua18
-rw-r--r--test/functional/provider/python_spec.lua18
5 files changed, 56 insertions, 30 deletions
diff --git a/.ci/before_install.sh b/.ci/before_install.sh
index e70654c9be..2a1ac05569 100755
--- a/.ci/before_install.sh
+++ b/.ci/before_install.sh
@@ -10,4 +10,19 @@ fi
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
brew update
fi
-pip install --user --upgrade pip
+
+echo "Upgrade Python 2's pip."
+pip2.7 install --user --upgrade pip
+
+if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
+ echo "Install Python 3."
+ brew install python3
+ echo "Upgrade Python 3's pip."
+ pip3 install --user --upgrade pip
+else
+ # TODO: Replace with upgrade when Travis gets python3-pip package.
+ echo "Install pip for Python 3."
+ curl -sSL https://bootstrap.pypa.io/get-pip.py -o "${HOME}/get-pip.py"
+ # After this, pip in PATH will refer to Python 3's pip.
+ python3.3 "${HOME}/get-pip.py" --user --upgrade
+fi
diff --git a/.ci/install.sh b/.ci/install.sh
index 42c8026396..ad3ef1b8b7 100755
--- a/.ci/install.sh
+++ b/.ci/install.sh
@@ -14,7 +14,17 @@ elif [[ "${BUILD_MINGW}" == ON ]]; then
# binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-dev mingw-w64-tools
echo "Downloading MinGW..."
- wget -q -O - "http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" | tar xJf - -C "${HOME}/.local"
+ curl -sSL "http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" | tar xJf - -C "${HOME}/.local"
fi
-pip install --user --upgrade cpp-coveralls neovim
+# Set CC to default to avoid compilation problems
+# when installing Python modules.
+echo "Install neovim module and coveralls for Python 2."
+CC=cc pip2.7 install --user --upgrade neovim cpp-coveralls
+
+echo "Install neovim module for Python 3."
+if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
+ CC=cc pip3 install --user --upgrade neovim
+else
+ CC=cc pip3.3 install --user --upgrade neovim
+fi
diff --git a/.travis.yml b/.travis.yml
index bd2c9b3938..f790c715ab 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,7 +9,7 @@ env:
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
- MAKE_CMD="make -j2"
# Update PATH for pip and MinGW.
- - PATH="$(python -c 'import site; print(site.getuserbase())')/bin:$HOME/.local/mingw32/bin:$PATH"
+ - PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$HOME/.local/mingw32/bin:$PATH"
# LLVM symbolizer path.
- LLVM_SYMBOLIZER="$(which llvm-symbolizer-3.6)"
# Force verification of DLOG macros.
@@ -101,28 +101,29 @@ after_success: .ci/after_success.sh
addons:
apt:
sources:
+ # TODO: Remove PPA when Travis gets Python >=3.3.
+ - deadsnakes
- llvm-toolchain-precise-3.6
- ubuntu-toolchain-r-test
packages:
- # Basic Neovim/test dependencies.
- autoconf
- automake
- build-essential
- - cmake
- - gdb
- - libtool
- - pkg-config
- - unzip
- - xclip
- # Additional compilers/tools.
- clang-3.6
+ - cmake
- g++-5-multilib
- g++-multilib
- gcc-5-multilib
- gcc-multilib
+ - gdb
- libc6-dev-i386
+ - libtool
- llvm-3.6-dev
+ - pkg-config
+ - python3.3-dev
+ - unzip
- valgrind
+ - xclip
branches:
except:
diff --git a/test/functional/provider/python3_spec.lua b/test/functional/provider/python3_spec.lua
index 5be5390370..5ecc1a0a91 100644
--- a/test/functional/provider/python3_spec.lua
+++ b/test/functional/provider/python3_spec.lua
@@ -1,19 +1,19 @@
+local helpers = require('test.functional.helpers')
+local eval, command, feed = helpers.eval, helpers.command, helpers.feed
+local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert
+local expect, write_file = helpers.expect, helpers.write_file
+
do
- local proc = io.popen(
- [[python3 -c 'import neovim, sys; sys.stdout.write("ok")' 2> /dev/null]])
- if proc:read() ~= 'ok' then
+ command('let [g:interp, g:errors] = provider#pythonx#Detect(3)')
+ local errors = eval('g:errors')
+ if errors ~= '' then
pending(
- 'python3 (or the python3 neovim module) is broken or missing',
+ 'Python 3 (or the Python 3 neovim module) is broken or missing:\n' .. errors,
function() end)
return
end
end
-local helpers = require('test.functional.helpers')
-local eval, command, feed = helpers.eval, helpers.command, helpers.feed
-local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert
-local expect, write_file = helpers.expect, helpers.write_file
-
describe('python3 commands and functions', function()
before_each(function()
clear()
diff --git a/test/functional/provider/python_spec.lua b/test/functional/provider/python_spec.lua
index ec1a853546..f37c16a26a 100644
--- a/test/functional/provider/python_spec.lua
+++ b/test/functional/provider/python_spec.lua
@@ -1,19 +1,19 @@
+local helpers = require('test.functional.helpers')
+local eval, command, feed = helpers.eval, helpers.command, helpers.feed
+local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert
+local expect, write_file = helpers.expect, helpers.write_file
+
do
- local proc = io.popen(
- [[python -c 'import neovim, sys; sys.stdout.write("ok")' 2> /dev/null]])
- if proc:read() ~= 'ok' then
+ command('let [g:interp, g:errors] = provider#pythonx#Detect(2)')
+ local errors = eval('g:errors')
+ if errors ~= '' then
pending(
- 'python (or the python neovim module) is broken or missing',
+ 'Python 2 (or the Python 2 neovim module) is broken or missing:\n' .. errors,
function() end)
return
end
end
-local helpers = require('test.functional.helpers')
-local eval, command, feed = helpers.eval, helpers.command, helpers.feed
-local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert
-local expect, write_file = helpers.expect, helpers.write_file
-
describe('python commands and functions', function()
before_each(function()
clear()