diff options
author | Florian Bruhin <git@the-compiler.org> | 2015-05-27 08:10:02 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2015-05-27 08:10:02 +0200 |
commit | 2a269e9cd9b2865b3448f7a57a62c078f6cb22d8 (patch) | |
tree | aaee2e47ed6d6733babf965625881efa18fa6bb7 /scripts/link_pyqt.py | |
parent | 1b48dc8749eb2135ed269e881fc610acb790da52 (diff) | |
download | qutebrowser-2a269e9cd9b2865b3448f7a57a62c078f6cb22d8.tar.gz qutebrowser-2a269e9cd9b2865b3448f7a57a62c078f6cb22d8.zip |
tox: Make sipconfig.py optional in link_pyqt.py.
For some reason sipconfig.py doesn't exist at all on Windows...
Diffstat (limited to 'scripts/link_pyqt.py')
-rw-r--r-- | scripts/link_pyqt.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/link_pyqt.py b/scripts/link_pyqt.py index b6621126d..7c8a77b58 100644 --- a/scripts/link_pyqt.py +++ b/scripts/link_pyqt.py @@ -70,13 +70,16 @@ def link_pyqt(sys_path, venv_path): if not globbed_sip: raise Error("Did not find sip in {}!".format(sys_path)) - files = ['PyQt5', 'sipconfig.py'] - files += [os.path.basename(e) for e in globbed_sip] - for fn in files: + files = [('PyQt5', True), ('sipconfig.py', False)] + files += [(os.path.basename(e), True) for e in globbed_sip] + for fn, required in files: source = os.path.join(sys_path, fn) dest = os.path.join(venv_path, fn) if not os.path.exists(source): - raise FileNotFoundError(source) + if required: + raise FileNotFoundError(source) + else: + continue if os.path.exists(dest): if os.path.isdir(dest) and not os.path.islink(dest): shutil.rmtree(dest) |