Skip to content

Commit

Permalink
Auto merge of #466 - Valloric:ubuntu-fix, r=micbou
Browse files Browse the repository at this point in the history
[READY] Storing path to Python used in build.py

We'll use this in YCM to ensure we start ycmd with the same version of
Python that was used for building the C++ libraries loaded into ycmd.

Related to ycm-core/YouCompleteMe#2136

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/466)
<!-- Reviewable:end -->
  • Loading branch information
homu committed Apr 27, 2016
2 parents a3c41b4 + 5390348 commit 89e558f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ nosetests.xml

# custom
ycm_core_tests
PYTHON_USED_DURING_BUILDING

# When we use the bcp tool to copy over the parts of boost we care about, it
# also copies some cruft files we don't need; this ignores them
Expand Down
8 changes: 8 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@ def SetUpTern():
subprocess.check_call( [ paths[ 'npm' ], 'install', '--production' ] )


def WritePythonUsedDuringBuild():
path = p.join( DIR_OF_THIS_SCRIPT, 'PYTHON_USED_DURING_BUILDING' )
with open( path, 'w' ) as f:
f.write( sys.executable )


def Main():
CheckDeps()
args = ParseArguments()
Expand All @@ -440,6 +446,8 @@ def Main():
SetUpTern()
if args.racer_completer or args.all_completers:
BuildRacerd()
WritePythonUsedDuringBuild()


if __name__ == '__main__':
Main()

0 comments on commit 89e558f

Please sign in to comment.