VirtualBox

Changeset 28292 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 14, 2010 10:54:32 AM (15 years ago)
Author:
vboxsync
Message:

Python: OSX SDK searching

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/common/vboxapisetup.py

    r20389 r28292  
    1717from distutils.core import setup
    1818
    19 def patchWith(file,install):
     19def patchWith(file,install,sdk):
    2020    newFile=file+".new"
    21     install=install.replace("\\", "\\\\") 
    22     try: 
     21    install=install.replace("\\", "\\\\")
     22    try:
    2323        os.remove(newFile)
    2424    except:
     
    2828    for line in oldF:
    2929        line=line.replace("%VBOX_INSTALL_PATH%",install)
     30        line=line.replace("%VBOX_SDK_PATH%",sdk)
    3031        newF.write(line)
    3132    newF.close()
    3233    oldF.close()
    33     try: 
     34    try:
    3435        os.remove(file)
    3536    except:
     
    4647        # Should we use VBox version for binding module versioning?
    4748        vboxVersion = "1.0"
    48         #raise Exception("No VBOX_VERSION defined, exiting")
    49     patchWith(os.path.join(os.path.dirname(sys.argv[0]), 'vboxapi', '__init__.py'), vboxDest)
     49    import platform
     50    if platform.system() == 'Darwin':
     51        vboxSdkDest = os.path.join(vboxDest, "..", "..", "..", "sdk")
     52    else:
     53        vboxSdkDest = os.path.join(vboxDest, "sdk")
     54    patchWith(os.path.join(os.path.dirname(sys.argv[0]), 'vboxapi', '__init__.py'), vboxDest, vboxSdkDest)
    5055    setup(name='vboxapi',
    5156      version=vboxVersion,
    5257      description='Python interface to VirtualBox',
    53       author='Sun Microsystems',
     58      author='Oracle Corp.',
    5459      author_email='[email protected]',
    5560      url='http://www.virtualbox.org',
  • trunk/src/VBox/Main/glue/vboxapi.py

    r23552 r28292  
    1717import traceback
    1818
     19# To set Python bitness on OSX use 'export VERSIONER_PYTHON_PREFER_32_BIT=yes'
     20
    1921VboxBinDir = os.environ.get("VBOX_PROGRAM_PATH", None)
    2022VboxSdkDir = os.environ.get("VBOX_SDK_PATH", None)
     
    2527
    2628if VboxSdkDir is None:
    27     VboxSdkDir = os.path.join(VboxBinDir,"sdk")
     29    # Will be set by the installer
     30    VboxSdkDir = "%VBOX_SDK_PATH%"
    2831
    2932os.environ["VBOX_PROGRAM_PATH"] = VboxBinDir
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