Addressing review comments
This commit is contained in:
parent
5b61b34703
commit
eb8a24f23d
@ -52,9 +52,4 @@ addons:
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.cache/pip # Python packages from pip
|
- $HOME/.cache/pip # Python packages from pip
|
||||||
- $HOME/.npm # Node packages from npm
|
|
||||||
- $HOME/.multirust # What multirust downloads
|
|
||||||
- $HOME/.cargo # Cargo package deps
|
|
||||||
- $HOME/.pyenv # pyenv
|
- $HOME/.pyenv # pyenv
|
||||||
- $TRAVIS_BUILD_DIR/clang_archives # Clang downloads
|
|
||||||
- $TRAVIS_BUILD_DIR/third_party/racerd/target # Racerd compilation
|
|
||||||
|
@ -29,6 +29,7 @@ let s:cursor_moved = 0
|
|||||||
let s:moved_vertically_in_insert_mode = 0
|
let s:moved_vertically_in_insert_mode = 0
|
||||||
let s:previous_num_chars_on_current_line = strlen( getline('.') )
|
let s:previous_num_chars_on_current_line = strlen( getline('.') )
|
||||||
|
|
||||||
|
|
||||||
function! s:UsingPython2()
|
function! s:UsingPython2()
|
||||||
" I'm willing to bet quite a bit that sooner or later, somebody will ask us to
|
" I'm willing to bet quite a bit that sooner or later, somebody will ask us to
|
||||||
" make it configurable which version of Python we use.
|
" make it configurable which version of Python we use.
|
||||||
@ -38,10 +39,12 @@ function! s:UsingPython2()
|
|||||||
return 0
|
return 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
let s:using_python2 = s:UsingPython2()
|
let s:using_python2 = s:UsingPython2()
|
||||||
let s:python_until_eof = s:using_python2 ? "python << EOF" : "python3 << EOF"
|
let s:python_until_eof = s:using_python2 ? "python << EOF" : "python3 << EOF"
|
||||||
let s:python_command = s:using_python2 ? "py " : "py3 "
|
let s:python_command = s:using_python2 ? "py " : "py3 "
|
||||||
|
|
||||||
|
|
||||||
function! s:Pyeval( eval_string )
|
function! s:Pyeval( eval_string )
|
||||||
if s:using_python2
|
if s:using_python2
|
||||||
return pyeval( a:eval_string )
|
return pyeval( a:eval_string )
|
||||||
|
@ -35,7 +35,7 @@ DIR_OF_YCMD = os.path.join( DIR_OF_CURRENT_SCRIPT, '..', '..', 'third_party',
|
|||||||
'ycmd' )
|
'ycmd' )
|
||||||
WIN_PYTHON_PATH = os.path.join( sys.exec_prefix, 'python.exe' )
|
WIN_PYTHON_PATH = os.path.join( sys.exec_prefix, 'python.exe' )
|
||||||
PYTHON_BINARY_REGEX = re.compile(
|
PYTHON_BINARY_REGEX = re.compile(
|
||||||
r'python((2(\.[67])?)|(3(\.[3456789])?))?(.exe)?$' )
|
r'python((2(\.[67])?)|(3(\.[3-9])?))?(.exe)?$' )
|
||||||
|
|
||||||
|
|
||||||
def Memoize( obj ):
|
def Memoize( obj ):
|
||||||
@ -73,9 +73,11 @@ def PathToPythonInterpreter():
|
|||||||
if IsPythonVersionCorrect( python_interpreter ):
|
if IsPythonVersionCorrect( python_interpreter ):
|
||||||
return python_interpreter
|
return python_interpreter
|
||||||
|
|
||||||
# As a last resort, we search python in the PATH. We check 'python2' before
|
# As a last resort, we search python in the PATH. We prefer Python 2 over 3
|
||||||
# 'python' because on some distributions (Arch Linux for example), python
|
# for the sake of backwards compatibility with ycm_extra_conf.py files out
|
||||||
# refers to python3.
|
# there; few people wrote theirs to work on py3.
|
||||||
|
# So we check 'python2' before 'python' because on some distributions (Arch
|
||||||
|
# Linux for example), python refers to python3.
|
||||||
python_interpreter = utils.PathToFirstExistingExecutable( [ 'python2',
|
python_interpreter = utils.PathToFirstExistingExecutable( [ 'python2',
|
||||||
'python',
|
'python',
|
||||||
'python3' ] )
|
'python3' ] )
|
||||||
|
@ -15,6 +15,14 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
from __future__ import print_function
|
||||||
|
from __future__ import division
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from future import standard_library
|
||||||
|
standard_library.install_aliases()
|
||||||
|
from builtins import * # noqa
|
||||||
|
|
||||||
from ycm.test_utils import MockVimModule
|
from ycm.test_utils import MockVimModule
|
||||||
MockVimModule()
|
MockVimModule()
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ REQUIREMENTS="ninja
|
|||||||
pkg-config
|
pkg-config
|
||||||
openssl"
|
openssl"
|
||||||
|
|
||||||
# Install node, go, ninja, pyenv and dependencies
|
# Install pyenv and dependencies
|
||||||
for pkg in $REQUIREMENTS; do
|
for pkg in $REQUIREMENTS; do
|
||||||
# Install package, or upgrade it if it is already installed
|
# Install package, or upgrade it if it is already installed
|
||||||
brew install $pkg || brew outdated $pkg || brew upgrade $pkg
|
brew install $pkg || brew outdated $pkg || brew upgrade $pkg
|
||||||
|
@ -47,7 +47,6 @@ python_version=$(python -c 'import sys; print( "{0}.{1}".format( sys.version_inf
|
|||||||
echo "Checking python version (actual ${python_version} vs expected ${YCM_PYTHON_VERSION})"
|
echo "Checking python version (actual ${python_version} vs expected ${YCM_PYTHON_VERSION})"
|
||||||
test ${python_version} == ${YCM_PYTHON_VERSION}
|
test ${python_version} == ${YCM_PYTHON_VERSION}
|
||||||
|
|
||||||
|
|
||||||
############
|
############
|
||||||
# pip setup
|
# pip setup
|
||||||
############
|
############
|
||||||
|
Loading…
x
Reference in New Issue
Block a user