VirtualBox

Changeset 28362 in vbox


Ignore:
Timestamp:
Apr 15, 2010 1:46:41 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60122
Message:

python: always use Python multiversion code

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r28350 r28362  
    455455# Enables the Python<->XPCOM and Python<->COM bindings.
    456456VBOX_WITH_PYTHON ?= 1
    457 # Build multiple Python<->XPCOM bridges for different Python version
    458 #ifn1of ($(KBUILD_TARGET), darwin)
    459 VBOX_WITH_MULTIVERSION_PYTHON ?= 1
    460 #endif
    461457# Enable the kchmviewer.
    462458VBOX_WITH_KCHMVIEWER = 1
  • trunk/src/libs/xpcom18a4/Makefile.kmk

    r27140 r28362  
    13611361# Find the Python headers for the Python<->XPCOM bridge if enabled.
    13621362ifdef VBOX_WITH_PYTHON
    1363 ifdef VBOX_WITH_MULTIVERSION_PYTHON
    1364  include $(PATH_SUB_CURRENT)/python/Makefile.kmk
    1365 else
    1366  if "$(KBUILD_TARGET)" == "darwin" && !defined(VBOX_PATH_PYTHON_INC) && !defined(VBOX_LIB_PYTHON)
    1367   ifndef VBOX_PYTHON_FRAMEWORK
    1368    VBOX_PYTHON_FRAMEWORK := -framework Python
    1369    VBOX_PATH_PYTHON_INC := $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Python.framework/Headers
    1370   endif
    1371  else  # !darwin || configured darwin
    1372   ifndef VBOX_PATH_PYTHON_INC
    1373    # As we build Solaris on newer Nevadas (109 currently) we want to use libpython2.4 for IPS compatiblity
    1374    # with older Nevada/OpenSolaris versions upon importing/installing the package. Otherwise we pick the
    1375    # highest libpython2.X available on the build box (2.6 on 109). We thus hardcode it to 2.4 here...
    1376    ifeq ($(KBUILD_TARGET),solaris)
    1377     VBOX_PATH_PYTHON_INC := /usr/include/python2.4
    1378    else
    1379     VBOX_PATH_PYTHON_INC := $(patsubst %/Python.h,%, $(lastword $(sort $(wildcard \
    1380         /usr/include/python2.*/Python.h \
    1381         /usr/local/include/python2.*/Python.h \
    1382         ))))
    1383    endif
    1384    ifeq ($(VBOX_PATH_PYTHON_INC),)
    1385     $(warning Unable to determine the python include directory (VBOX_PATH_PYTHON_INC).)
    1386    endif
    1387   endif
    1388   VBOX_PYTHON_VER := 2$(lastword $(subst ., .,$(VBOX_PATH_PYTHON_INC)))
    1389   ifndef VBOX_LIB_PYTHON
    1390    VBOX_TMP := $(if $(eq $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),solaris.amd64),64/,)
    1391    VBOX_LIB_PYTHON := $(firstword $(wildcard \
    1392         /usr/lib/$(VBOX_TMP)libpython$(VBOX_PYTHON_VER)$(SUFF_DLL) \
    1393         /usr/local/lib/$(VBOX_TMP)libpython$(VBOX_PYTHON_VER)$(SUFF_DLL) \
    1394         /usr/lib/$(VBOX_TMP)libpython2$(SUFF_DLL) \
    1395         /usr/local/lib/$(VBOX_TMP)libpython2$(SUFF_DLL) \
    1396         /usr/lib/$(VBOX_TMP)libpython$(SUFF_DLL) \
    1397         /usr/local/lib/$(VBOX_TMP)libpython$(SUFF_DLL) \
    1398         ))
    1399    ifeq ($(VBOX_LIB_PYTHON),)
    1400     $(warning Unable to determine the python library (VBOX_LIB_PYTHON).)
    1401    endif
    1402   endif # !darwin || configured darwin
    1403  endif
    1404  ifndef VBOX_ONLY_SDK
    1405   DLLS += VBoxPython
    1406  endif
    1407  INSTALLS += VBoxPython-inst-py-xpcom
    1408 
    1409  # Python Client Module - the C++/XPCOM bits.
    1410  VBoxPython_TEMPLATE = XPCOM
    1411  VBoxPython_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTI_API EXPORT_XPT_API \
    1412         VBOX_PYXPCOM VBOX_WITH_XPCOM
    1413  VBoxPython_DEFS.darwin = VBOX_PYXPCOM_VERSIONED
    1414  VBoxPython_NAME.darwin = VBoxPython2_$(translate $(substr $(VBOX_DEF_MACOSX_VERSION_MIN),4),456,356)
    1415  ifeq ($(KBUILD_TARGET),darwin)
    1416   ## @todo kBuild - this ain't working: VBoxPython_DLLSUFF.darwin = .so
    1417   VBoxPython_DLLSUFF = .so
    1418  endif
    1419  VBoxPython_LDFLAGS.darwin  = $(VBOX_PYTHON_FRAMEWORK)
    1420  VBoxPython_CXXFLAGS = -Wno-format
    1421  VBoxPython_INCS = \
    1422         python/src \
    1423         $(VBOX_PATH_PYTHON_INC)
    1424  VBoxPython_SOURCES = \
    1425         python/src/module/_xpcom.cpp \
    1426         python/src/dllmain.cpp \
    1427         python/src/ErrorUtils.cpp \
    1428         python/src/PyGBase.cpp \
    1429         python/src/PyGInputStream.cpp \
    1430         python/src/PyGModule.cpp \
    1431         python/src/PyGStub.cpp \
    1432         python/src/PyGWeakReference.cpp \
    1433         python/src/PyIClassInfo.cpp \
    1434         python/src/PyIComponentManager.cpp \
    1435         python/src/PyIComponentManagerObsolete.cpp \
    1436         python/src/PyIEnumerator.cpp \
    1437         python/src/PyIID.cpp \
    1438         python/src/PyIInputStream.cpp \
    1439         python/src/PyIInterfaceInfo.cpp \
    1440         python/src/PyIInterfaceInfoManager.cpp \
    1441         python/src/PyISimpleEnumerator.cpp \
    1442         python/src/PyISupports.cpp \
    1443         python/src/PyIVariant.cpp \
    1444         python/src/Pyxpt_info.cpp \
    1445         python/src/TypeObject.cpp \
    1446         python/src/VariantUtils.cpp
    1447  VBoxPython_LIBS = \
    1448         $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
    1449         $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL) \
    1450         $(VBOX_LIB_PYTHON)
    1451 
    1452  if  !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_5) \
    1453   && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86" \
    1454   && "$(VBOX_DEF_MACOSX_VERSION_MIN)" != "10.5"
    1455   # Same as VBoxPython except built against the Mac OS X 10.5 SDK.
    1456   DLLS += VBoxPython2_5
    1457   VBoxPython2_5_EXTENDS = VBoxPython
    1458   VBoxPython2_5_TEMPLATE = XPCOMOSX105
    1459   VBoxPython2_5_NAME.darwin = VBoxPython2_5
    1460   VBoxPython2_5_INCS = \
    1461         python/src \
    1462         $(VBOX_PATH_MACOSX_SDK_10_5)/System/Library/Frameworks/Python.framework/Headers
    1463  endif
    1464 
    1465  if defined(VBOX_WITH_VBOXPYTHON25_FOR_SOLARIS) && "$(KBUILD_TARGET)" == "solaris"
    1466   # Same as VBoxPython except built against the newer python version.
    1467   DLLS += VBoxPython2_5
    1468   VBoxPython2_5_EXTENDS = VBoxPython
    1469   VBoxPython2_5_TEMPLATE = XPCOM
    1470   VBoxPython2_5_NAME = VBoxPython2_5
    1471   VBoxPython2_5_INCS = \
    1472         python/src \
    1473         /usr/include/python2.5
    1474   VBoxPython2_5_LIBS = \
    1475         $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
    1476         $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL) \
    1477         /usr/lib/$(VBOX_TMP)libpython2.5$(SUFF_DLL)
    1478  endif
    1479 
    1480  if !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) \
    1481   && "$(KBUILD_TARGET)" == "darwin" \
    1482   && "$(VBOX_DEF_MACOSX_VERSION_MIN)" != "10.6"
    1483   # Same as VBoxPython except built against the Mac OS X 10.6 SDK.
    1484   DLLS += VBoxPython2_6
    1485   VBoxPython2_6_EXTENDS = VBoxPython
    1486   VBoxPython2_6_TEMPLATE = XPCOMOSX106
    1487   VBoxPython2_6_NAME.darwin = VBoxPython2_6
    1488   VBoxPython2_6_INCS = \
    1489         python/src \
    1490         $(VBOX_PATH_MACOSX_SDK_10_6)/System/Library/Frameworks/Python.framework/Headers
    1491  endif
    1492 
    1493  # Python Client Module - the Python bits.
    1494  VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
    1495  VBoxPython-inst-py-xpcom_SOURCES = \
    1496         python/vboxxpcom.py \
    1497         python/components.py \
    1498         python/file.py \
    1499         python/__init__.py \
    1500         python/nsError.py \
    1501         python/primitives.py \
    1502         python/xpcom_consts.py \
    1503         python/xpt.py \
    1504         python/client/__init__.py=>client/__init__.py \
    1505         python/server/__init__.py=>server/__init__.py \
    1506         python/server/enumerator.py=>server/enumerator.py \
    1507         python/server/factory.py=>server/factory.py \
    1508         python/server/loader.py=>server/loader.py \
    1509         python/server/module.py=>server/module.py \
    1510         python/server/policy.py=>server/policy.py
    1511 
    1512 endif # !VBOX_WITH_MULTIVERSION_PYTHON
     1363  include $(PATH_SUB_CURRENT)/python/Makefile.kmk
    15131364endif # VBOX_WITH_PYTHON
    15141365
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