1 Star 0 Fork 0

ihsan/YouCompleteMe

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.py 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
Boris Staletic 提交于 2020-07-21 14:14 . Drop python 3.5 support
#!/usr/bin/env python3
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from __future__ import absolute_import
import os
import subprocess
import sys
import os.path as p
import glob
version = sys.version_info[ 0 : 3 ]
if version < ( 3, 6, 0 ):
sys.exit( 'YouCompleteMe requires Python >= 3.6.0; '
'your version of Python is ' + sys.version )
DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) )
DIR_OF_OLD_LIBS = p.join( DIR_OF_THIS_SCRIPT, 'python' )
def CheckCall( args, **kwargs ):
try:
subprocess.check_call( args, **kwargs )
except subprocess.CalledProcessError as error:
sys.exit( error.returncode )
def Main():
build_file = p.join( DIR_OF_THIS_SCRIPT, 'third_party', 'ycmd', 'build.py' )
if not p.isfile( build_file ):
sys.exit(
'File {0} does not exist; you probably forgot to run:\n'
'\tgit submodule update --init --recursive\n'.format( build_file ) )
CheckCall( [ sys.executable, build_file ] + sys.argv[ 1: ] )
# Remove old YCM libs if present so that YCM can start.
old_libs = (
glob.glob( p.join( DIR_OF_OLD_LIBS, '*ycm_core.*' ) ) +
glob.glob( p.join( DIR_OF_OLD_LIBS, '*ycm_client_support.*' ) ) +
glob.glob( p.join( DIR_OF_OLD_LIBS, '*clang*.*' ) ) )
for lib in old_libs:
os.remove( lib )
if __name__ == "__main__":
Main()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/KurbanEhsan/YouCompleteMe.git
git@gitee.com:KurbanEhsan/YouCompleteMe.git
KurbanEhsan
YouCompleteMe
YouCompleteMe
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385