ci_install: Hopefully fix checking setup.
This commit is contained in:
parent
d20f7b76b3
commit
515c9611c4
@ -48,6 +48,12 @@ def brew(args, silent=False):
|
|||||||
subprocess.check_call(['brew'] + args)
|
subprocess.check_call(['brew'] + args)
|
||||||
|
|
||||||
|
|
||||||
|
def check_setup(executable):
|
||||||
|
print("Checking setup...")
|
||||||
|
subprocess.check_call([executable, '-c', 'import PyQt5'])
|
||||||
|
subprocess.check_call([executable, '-c', 'import sip'])
|
||||||
|
|
||||||
|
|
||||||
if 'APPVEYOR' in os.environ:
|
if 'APPVEYOR' in os.environ:
|
||||||
print("Getting PyQt5...")
|
print("Getting PyQt5...")
|
||||||
urllib.urlretrieve(
|
urllib.urlretrieve(
|
||||||
@ -64,6 +70,8 @@ if 'APPVEYOR' in os.environ:
|
|||||||
print("Linking Python...")
|
print("Linking Python...")
|
||||||
with open(r'C:\Windows\system32\python3.bat', 'w') as f:
|
with open(r'C:\Windows\system32\python3.bat', 'w') as f:
|
||||||
f.write(r'@C:\Python34\python %*')
|
f.write(r'@C:\Python34\python %*')
|
||||||
|
|
||||||
|
check_setup(r'C:\Python24\python')
|
||||||
elif os.environ.get('TRAVIS_OS_NAME', None) == 'linux':
|
elif os.environ.get('TRAVIS_OS_NAME', None) == 'linux':
|
||||||
print("apt-get update...")
|
print("apt-get update...")
|
||||||
apt_get(['update'])
|
apt_get(['update'])
|
||||||
@ -71,6 +79,7 @@ elif os.environ.get('TRAVIS_OS_NAME', None) == 'linux':
|
|||||||
print("Installing packages...")
|
print("Installing packages...")
|
||||||
pkgs = 'python3-pyqt5 python3-pyqt5.qtwebkit python-tox python3-dev xvfb'
|
pkgs = 'python3-pyqt5 python3-pyqt5.qtwebkit python-tox python3-dev xvfb'
|
||||||
apt_get(['install'] + pkgs.split())
|
apt_get(['install'] + pkgs.split())
|
||||||
|
check_setup('python3')
|
||||||
elif os.environ.get('TRAVIS_OS_NAME', None) == 'osx':
|
elif os.environ.get('TRAVIS_OS_NAME', None) == 'osx':
|
||||||
print("brew update...")
|
print("brew update...")
|
||||||
brew(['update'], silent=True)
|
brew(['update'], silent=True)
|
||||||
@ -81,6 +90,8 @@ elif os.environ.get('TRAVIS_OS_NAME', None) == 'osx':
|
|||||||
print("Installing tox...")
|
print("Installing tox...")
|
||||||
subprocess.check_call(['sudo', 'pip3.4', 'install', 'tox'])
|
subprocess.check_call(['sudo', 'pip3.4', 'install', 'tox'])
|
||||||
|
|
||||||
|
check_setup('python3')
|
||||||
|
|
||||||
os.system('ls -l /usr/local/bin/xvfb-run')
|
os.system('ls -l /usr/local/bin/xvfb-run')
|
||||||
print("Creating xvfb-run stub...")
|
print("Creating xvfb-run stub...")
|
||||||
with open('/usr/local/bin/xvfb-run', 'w') as f:
|
with open('/usr/local/bin/xvfb-run', 'w') as f:
|
||||||
@ -99,8 +110,3 @@ else:
|
|||||||
env('TRAVIS'), env('TRAVIS_OS_NAME')),
|
env('TRAVIS'), env('TRAVIS_OS_NAME')),
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
print("Checking setup...")
|
|
||||||
subprocess.check_call(['python3', '-c', 'import PyQt5'])
|
|
||||||
subprocess.check_call(['python3', '-c', 'import sip'])
|
|
||||||
|
Loading…
Reference in New Issue
Block a user