Separate YCM/ycmd submodules
This commit is contained in:
parent
80246aa9a2
commit
5c12f5e357
18
.gitmodules
vendored
18
.gitmodules
vendored
@ -4,3 +4,21 @@
|
||||
[submodule "third_party/ycmd"]
|
||||
path = third_party/ycmd
|
||||
url = https://github.com/Valloric/ycmd
|
||||
[submodule "third_party/requests_deps/idna"]
|
||||
path = third_party/requests_deps/idna
|
||||
url = https://github.com/kjd/idna
|
||||
[submodule "third_party/requests_deps/certifi"]
|
||||
path = third_party/requests_deps/certifi
|
||||
url = https://github.com/certifi/python-certifi
|
||||
[submodule "third_party/requests_deps/chardet"]
|
||||
path = third_party/requests_deps/chardet
|
||||
url = https://github.com/chardet/chardet
|
||||
[submodule "third_party/requests_deps/urllib3"]
|
||||
path = third_party/requests_deps/urllib3
|
||||
url = https://github.com/urllib3/urllib3
|
||||
[submodule "third_party/requests_deps/requests"]
|
||||
path = third_party/requests_deps/requests
|
||||
url = https://github.com/kennethreitz/requests
|
||||
[submodule "third_party/python-future"]
|
||||
path = third_party/python-future
|
||||
url = https://github.com/PythonCharmers/python-future
|
||||
|
@ -28,18 +28,16 @@
|
||||
#
|
||||
# For more information, please refer to <http://unlicense.org/>
|
||||
|
||||
import os
|
||||
import os.path as p
|
||||
import subprocess
|
||||
|
||||
DIR_OF_THIS_SCRIPT = os.path.abspath( os.path.dirname( __file__ ) )
|
||||
DIR_OF_THIRD_PARTY = os.path.join( DIR_OF_THIS_SCRIPT, 'third_party' )
|
||||
DIR_OF_YCMD_THIRD_PARTY = os.path.join( DIR_OF_THIRD_PARTY,
|
||||
'ycmd', 'third_party' )
|
||||
DIR_OF_THIS_SCRIPT = p.abspath( p.dirname( __file__ ) )
|
||||
DIR_OF_THIRD_PARTY = p.join( DIR_OF_THIS_SCRIPT, 'third_party' )
|
||||
|
||||
|
||||
def GetStandardLibraryIndexInSysPath( sys_path ):
|
||||
for index, path in enumerate( sys_path ):
|
||||
if os.path.isfile( os.path.join( path, 'os.py' ) ):
|
||||
if p.isfile( p.join( path, 'os.py' ) ):
|
||||
return index
|
||||
raise RuntimeError( 'Could not find standard library path in Python path.' )
|
||||
|
||||
@ -47,11 +45,17 @@ def GetStandardLibraryIndexInSysPath( sys_path ):
|
||||
def PythonSysPath( **kwargs ):
|
||||
sys_path = kwargs[ 'sys_path' ]
|
||||
|
||||
dependencies = [ os.path.join( DIR_OF_THIS_SCRIPT, 'python' ),
|
||||
os.path.join( DIR_OF_THIRD_PARTY, 'requests-futures' ),
|
||||
os.path.join( DIR_OF_THIRD_PARTY, 'ycmd' ),
|
||||
os.path.join( DIR_OF_YCMD_THIRD_PARTY, 'frozendict' ),
|
||||
os.path.join( DIR_OF_YCMD_THIRD_PARTY, 'requests' ) ]
|
||||
dependencies = [ p.join( DIR_OF_THIS_SCRIPT, 'python' ),
|
||||
p.join( DIR_OF_THIRD_PARTY, 'requests-futures' ),
|
||||
p.join( DIR_OF_THIRD_PARTY, 'ycmd' ),
|
||||
p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'idna' ),
|
||||
p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'chardet' ),
|
||||
p.join( DIR_OF_THIRD_PARTY,
|
||||
'requests_deps',
|
||||
'urllib3',
|
||||
'src' ),
|
||||
p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'certifi' ),
|
||||
p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'requests' ) ]
|
||||
|
||||
# The concurrent.futures module is part of the standard library on Python 3.
|
||||
interpreter_path = kwargs[ 'interpreter_path' ]
|
||||
@ -59,11 +63,10 @@ def PythonSysPath( **kwargs ):
|
||||
interpreter_path, '-c', 'import sys; print( sys.version_info[ 0 ] )' ]
|
||||
).rstrip().decode( 'utf8' ) )
|
||||
if major_version == 2:
|
||||
dependencies.append( os.path.join( DIR_OF_THIRD_PARTY, 'pythonfutures' ) )
|
||||
dependencies.append( p.join( DIR_OF_THIRD_PARTY, 'pythonfutures' ) )
|
||||
|
||||
sys_path[ 0:0 ] = dependencies
|
||||
sys_path.insert( GetStandardLibraryIndexInSysPath( sys_path ) + 1,
|
||||
os.path.join( DIR_OF_YCMD_THIRD_PARTY, 'python-future',
|
||||
'src' ) )
|
||||
p.join( DIR_OF_THIRD_PARTY, 'python-future', 'src' ) )
|
||||
|
||||
return sys_path
|
||||
|
@ -194,13 +194,19 @@ import vim
|
||||
|
||||
root_folder = p.normpath( p.join( vim.eval( 's:script_folder_path' ), '..' ) )
|
||||
third_party_folder = p.join( root_folder, 'third_party' )
|
||||
ycmd_third_party_folder = p.join( third_party_folder, 'ycmd', 'third_party' )
|
||||
|
||||
# Add dependencies to Python path.
|
||||
dependencies = [ p.join( root_folder, 'python' ),
|
||||
p.join( third_party_folder, 'requests-futures' ),
|
||||
p.join( third_party_folder, 'ycmd' ),
|
||||
p.join( ycmd_third_party_folder, 'requests' ) ]
|
||||
p.join( third_party_folder, 'requests_deps', 'idna' ),
|
||||
p.join( third_party_folder, 'requests_deps', 'chardet' ),
|
||||
p.join( third_party_folder,
|
||||
'requests_deps',
|
||||
'urllib3',
|
||||
'src' ),
|
||||
p.join( third_party_folder, 'requests_deps', 'certifi' ),
|
||||
p.join( third_party_folder, 'requests_deps', 'requests' ) ]
|
||||
|
||||
# The concurrent.futures module is part of the standard library on Python 3.
|
||||
if sys.version_info[ 0 ] == 2:
|
||||
@ -213,7 +219,7 @@ try:
|
||||
# The python-future module must be inserted after the standard library path.
|
||||
from ycmd.server_utils import GetStandardLibraryIndexInSysPath
|
||||
sys.path.insert( GetStandardLibraryIndexInSysPath() + 1,
|
||||
p.join( ycmd_third_party_folder, 'python-future', 'src' ) )
|
||||
p.join( third_party_folder, 'python-future', 'src' ) )
|
||||
|
||||
# Import the modules used in this file.
|
||||
from ycm import base, vimsupport, youcompleteme
|
||||
|
1
third_party/python-future
vendored
Submodule
1
third_party/python-future
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a8114e48ce7dbc4cecbf6a764d73e83d03b0d6ba
|
1
third_party/requests_deps/certifi
vendored
Submodule
1
third_party/requests_deps/certifi
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 5b9e05c06e69fe5c7835052cfc3ae1c899dfc8b1
|
1
third_party/requests_deps/chardet
vendored
Submodule
1
third_party/requests_deps/chardet
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 9b8c5c2fb118d76c6beeab9affd01c332732a530
|
1
third_party/requests_deps/idna
vendored
Submodule
1
third_party/requests_deps/idna
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 0f50bdcea71e6602bf4cd22897970d71fc4074d9
|
1
third_party/requests_deps/requests
vendored
Submodule
1
third_party/requests_deps/requests
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 6cfbe1aedd56f8c2f9ff8b968efe65b22669795b
|
1
third_party/requests_deps/urllib3
vendored
Submodule
1
third_party/requests_deps/urllib3
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a6ec68a5c5c5743c59fe5c62c635c929586c429b
|
Loading…
Reference in New Issue
Block a user