VirtualBox

Changeset 21254 in vbox


Ignore:
Timestamp:
Jul 6, 2009 2:30:09 PM (16 years ago)
Author:
vboxsync
Message:

Python: search lib64 too

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/python/gen_python_deps.py

    r21239 r21254  
    2323known = {}
    2424
    25 def checkPair(p, v,dllpre,dllsuff, do_bitness_magic):
     25def checkPair(p, v,dllpre,dllsuff, bitness_magic):
    2626    file =  os.path.join(p, "include", "python"+v, "Python.h")
    2727    if not os.path.isfile(file):
    2828        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:
    3033        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
    3138    else:
    3239        lib64 = None
    3340    return [os.path.join(p, "include", "python"+v),
    34             os.path.join(p, "lib", dllpre+"python"+v+dllsuff),
     41            lib,
    3542            lib64]
    3643
    37 def print_vars(vers, known, sep, do_bitness_magic):
     44def print_vars(vers, known, sep, bitness_magic):
    3845    print "VBOX_PYTHON%s_INC=%s%s" %(vers, known[0], sep)
    39     if do_bitness_magic:
     46    if bitness_magic > 0:
    4047       print "VBOX_PYTHON%s_LIB=%s%s" %(vers, known[2], sep)
    4148    else:
     
    4653    dllpre = "lib"
    4754    dllsuff = ".so"
    48     do_bitness_magic = 0
     55    bitness_magic = 0
    4956
    5057    if len(argv) > 1:
     
    6774
    6875    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
    7181    for v in versions:
    7282        for p in prefixes:
    73             c = checkPair(p, v, dllpre, dllsuff, do_bitness_magic)
     83            c = checkPair(p, v, dllpre, dllsuff, bitness_magic)
    7484            if c is not None:
    7585                known[v] = c
     
    8595            d = k
    8696        vers = k.replace('.', '')
    87         print_vars(vers, known[k], sep, do_bitness_magic)
     97        print_vars(vers, known[k], sep, bitness_magic)
    8898    if d is not None:
    89         print_vars("DEF", known[d], sep, do_bitness_magic)
     99        print_vars("DEF", known[d], sep, bitness_magic)
    90100
    91101if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette