Make init_venv.py work with multiple sip .so files.

On my Debian jessie there's a sip.cpython-34m-x86_64-linux-gnu.so and a
sip.cpython-34dm-x86_64-linux-gnu.so.
This commit is contained in:
Florian Bruhin 2015-01-06 11:26:40 +01:00
parent 46396cce1e
commit 3ff28027de

View File

@ -125,14 +125,10 @@ def link_pyqt():
if not globbed_sip: if not globbed_sip:
print("Did not find sip in {}!".format(sys_path), file=sys.stderr) print("Did not find sip in {}!".format(sys_path), file=sys.stderr)
sys.exit(1) sys.exit(1)
elif len(globbed_sip) != 1: files = [
print("Found multiple sip installations: {}!".format(globbed_sip),
file=sys.stderr)
sys.exit(1)
files = (
'PyQt5', 'PyQt5',
os.path.basename(globbed_sip[0]), ]
) files += [os.path.basename(e) for e in globbed_sip]
for fn in files: for fn in files:
source = os.path.join(sys_path, fn) source = os.path.join(sys_path, fn)
link_name = os.path.join(venv_path, fn) link_name = os.path.join(venv_path, fn)