VirtualBox

Changeset 28292 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Apr 14, 2010 10:54:32 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60044
Message:

Python: OSX SDK searching

File:
1 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',
Note: See TracChangeset for help on using the changeset viewer.

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