Auto merge of #2207 - micbou:install-script-python-version, r=micbou

[READY] Check Python version in install script

Closes #2206.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2207)
<!-- Reviewable:end -->
This commit is contained in:
Homu 2016-06-17 04:12:54 +09:00
commit 88abc4fc8c

View File

@ -1,11 +1,23 @@
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from __future__ import absolute_import
import os import os
import subprocess import subprocess
import sys import sys
import os.path as p import os.path as p
import glob import glob
PY_MAJOR, PY_MINOR = sys.version_info[ 0 : 2 ]
if not ( ( PY_MAJOR == 2 and PY_MINOR >= 6 ) or
( PY_MAJOR == 3 and PY_MINOR >= 3 ) or
PY_MAJOR > 3 ):
sys.exit( 'YouCompleteMe requires Python >= 2.6 or >= 3.3; '
'your version of Python is ' + sys.version )
DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) ) DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) )
DIR_OF_OLD_LIBS = p.join( DIR_OF_THIS_SCRIPT, 'python' ) DIR_OF_OLD_LIBS = p.join( DIR_OF_THIS_SCRIPT, 'python' )