mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
youcompleteme: fix for python 3.6 and vim 8.1.
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
From 6ac7ef62406490f085971b0ff49db89672af1bdd Mon Sep 17 00:00:00 2001
|
||||
From 5ae29af9eefebcbffaad9cec0790280a038f1d0a Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Fri, 10 Aug 2018 20:39:55 +0200
|
||||
Subject: Force use of Python 3 for the server on Haiku.
|
||||
Subject: Force use of Python 3.6 for the server on Haiku.
|
||||
|
||||
It is not possible to use Python 2 which is built with gcc2, as the
|
||||
server embeds a clang based .so file.
|
||||
|
||||
diff --git a/python/ycm/paths.py b/python/ycm/paths.py
|
||||
index a135e3a..28c740b 100644
|
||||
index a135e3a..01285a4 100644
|
||||
--- a/python/ycm/paths.py
|
||||
+++ b/python/ycm/paths.py
|
||||
@@ -57,23 +57,14 @@ def PathToPythonInterpreter():
|
||||
@@ -57,23 +57,12 @@ def PathToPythonInterpreter():
|
||||
if python_interpreter and utils.GetExecutable( python_interpreter ):
|
||||
return python_interpreter
|
||||
|
||||
@@ -23,13 +23,16 @@ index a135e3a..28c740b 100644
|
||||
- if _EndsWithPython( python_interpreter ):
|
||||
- return python_interpreter
|
||||
-
|
||||
# As a last resort, we search python in the PATH. We prefer Python 2 over 3
|
||||
# for the sake of backwards compatibility with ycm_extra_conf.py files out
|
||||
# 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.
|
||||
- # As a last resort, we search python in the PATH. We prefer Python 2 over 3
|
||||
- # for the sake of backwards compatibility with ycm_extra_conf.py files out
|
||||
- # 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( [ 'python3',
|
||||
+ # On Haiku we look for python3 first, our python2 is built with gcc2 so it
|
||||
+ # cannot load the ycm native library.
|
||||
+ python_interpreter = utils.PathToFirstExistingExecutable( [ 'python3.6',
|
||||
+ 'python3',
|
||||
'python',
|
||||
- 'python3' ] )
|
||||
+ 'python2' ] )
|
||||
@@ -37,5 +40,5 @@ index a135e3a..28c740b 100644
|
||||
return python_interpreter
|
||||
|
||||
--
|
||||
2.16.4
|
||||
2.21.0
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ etc.)."
|
||||
HOMEPAGE="http://valloric.github.io/YouCompleteMe/"
|
||||
COPYRIGHT="2015-2019 YouCompleteMe contributors"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/Valloric/YouCompleteMe/archive/ccc06c2c423e7ee7008f7439ff99c604d474cec1.zip"
|
||||
CHECKSUM_SHA256="8a1eb18bd7a063a8b6d950aaadca0b15717d3f37f3297ed1233dc0ef7cafdda9"
|
||||
SOURCE_DIR="YouCompleteMe-ccc06c2c423e7ee7008f7439ff99c604d474cec1"
|
||||
@@ -38,7 +38,7 @@ PROVIDES="
|
||||
# ycmd server) packages.
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:vim
|
||||
cmd:vim >= 8.1
|
||||
bottle_python3
|
||||
certifi_python
|
||||
certifi_python3
|
||||
@@ -86,11 +86,11 @@ BUILD()
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $dataDir/vim/vim80
|
||||
cp -r autoload doc python plugin ycm_build $dataDir/vim/vim80
|
||||
mkdir -p $dataDir/vim/vim81
|
||||
cp -r autoload doc python plugin $dataDir/vim/vim81
|
||||
|
||||
mkdir -p $dataDir/vim/vim80/third_party/ycmd
|
||||
cp -r third_party/ycmd/ycm_core.so $dataDir/vim/vim80/third_party/ycmd
|
||||
cp -r third_party/ycmd/ycmd $dataDir/vim/vim80/third_party/ycmd/ycmd
|
||||
cp third_party/ycmd/CORE_VERSION $dataDir/vim/vim80/third_party/ycmd/
|
||||
mkdir -p $dataDir/vim/vim81/third_party/ycmd
|
||||
cp -r third_party/ycmd/ycm_core.so $dataDir/vim/vim81/third_party/ycmd
|
||||
cp -r third_party/ycmd/ycmd $dataDir/vim/vim81/third_party/ycmd/ycmd
|
||||
cp third_party/ycmd/CORE_VERSION $dataDir/vim/vim81/third_party/ycmd/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user