Changeset 21254 in vbox
- Timestamp:
- Jul 6, 2009 2:30:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/gen_python_deps.py
r21239 r21254 23 23 known = {} 24 24 25 def checkPair(p, v,dllpre,dllsuff, do_bitness_magic):25 def checkPair(p, v,dllpre,dllsuff, bitness_magic): 26 26 file = os.path.join(p, "include", "python"+v, "Python.h") 27 27 if not os.path.isfile(file): 28 28 return None 29 if do_bitness_magic: 29 30 lib = os.path.join(p, "lib", dllpre+"python"+v+dllsuff) 31 32 if bitness_magic == 1: 30 33 lib64 = os.path.join(p, "lib", "64", dllpre+"python"+v+dllsuff) 34 elif bitness_magic == 2: 35 lib64 = os.path.join(p, "lib64", dllpre+"python"+v+dllsuff) 36 if not os.path.isfile(lib64): 37 lib64 = lib 31 38 else: 32 39 lib64 = None 33 40 return [os.path.join(p, "include", "python"+v), 34 os.path.join(p, "lib", dllpre+"python"+v+dllsuff),41 lib, 35 42 lib64] 36 43 37 def print_vars(vers, known, sep, do_bitness_magic):44 def print_vars(vers, known, sep, bitness_magic): 38 45 print "VBOX_PYTHON%s_INC=%s%s" %(vers, known[0], sep) 39 if do_bitness_magic:46 if bitness_magic > 0: 40 47 print "VBOX_PYTHON%s_LIB=%s%s" %(vers, known[2], sep) 41 48 else: … … 46 53 dllpre = "lib" 47 54 dllsuff = ".so" 48 do_bitness_magic = 055 bitness_magic = 0 49 56 50 57 if len(argv) > 1: … … 67 74 68 75 if target == 'solaris' and arch == 'amd64': 69 do_bitness_magic = 1 70 76 bitness_magic = 1 77 78 if target == 'linux' and arch == 'amd64': 79 bitness_magic = 2 80 71 81 for v in versions: 72 82 for p in prefixes: 73 c = checkPair(p, v, dllpre, dllsuff, do_bitness_magic)83 c = checkPair(p, v, dllpre, dllsuff, bitness_magic) 74 84 if c is not None: 75 85 known[v] = c … … 85 95 d = k 86 96 vers = k.replace('.', '') 87 print_vars(vers, known[k], sep, do_bitness_magic)97 print_vars(vers, known[k], sep, bitness_magic) 88 98 if d is not None: 89 print_vars("DEF", known[d], sep, do_bitness_magic)99 print_vars("DEF", known[d], sep, bitness_magic) 90 100 91 101 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.