1
0
forked from pool/virtualbox
virtualbox/vbox-python-detection.diff
Larry Finger ff1d6fb65b Accepting request 414498 from home:luizluca:branches:Virtualization
bump to 5.1.2

I tried to keep all Suse customization as they are. Warning dialogs were ported to Qt5.
I did not check for added executables in the new release.

Compile tested on all current targets. Runtime tested on Tumbleweed, both host and guest.

OBS-URL: https://build.opensuse.org/request/show/414498
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=262
2016-07-26 16:15:55 +00:00

50 lines
1.6 KiB
Diff

Index: VirtualBox-5.1.2/src/libs/xpcom18a4/python/gen_python_deps.py
===================================================================
--- VirtualBox-5.1.2.orig/src/libs/xpcom18a4/python/gen_python_deps.py
+++ VirtualBox-5.1.2/src/libs/xpcom18a4/python/gen_python_deps.py
@@ -75,7 +75,7 @@ def main(argv):
else:
multi = 1
- if multi == 0:
+ if not multi:
prefixes = ["/usr"]
versions = [str(sys.version_info[0])+'.'+str(sys.version_info[1])]
@@ -98,22 +98,23 @@ def main(argv):
continue
for p in prefixes:
c = checkPair(p, v, dllpre, dllsuff, bitness_magic)
- if c is not None:
+ if c:
known[v] = c
break
- keys = list(known.keys())
- # we want default to be the lowest versioned Python
- keys.sort()
- d = None
# We need separator other than newline, to sneak through $(shell)
sep = "|"
- for k in keys:
- if d is None:
- d = k
- vers = k.replace('.', '')
- print_vars(vers, known[k], sep, bitness_magic)
- if d is not None:
- print_vars("DEF", known[d], sep, bitness_magic)
+
+ if not known:
+ # this type of problem should be detected in configure
+ # print_vars("DEF", defaultpaths, sep, bitness_magic)
+ pass
+ if multi:
+ for ver, paths in known.items():
+ print_vars(ver.replace('.', ''), paths, sep, bitness_magic)
+ else:
+ ver = versions[0]
+ paths = known[ver]
+ print_vars(ver.replace('.', ''), paths, sep, bitness_magic)
if __name__ == '__main__':
main(sys.argv)