Changeset 8757:0531a70dc89c in orange


Ignore:
Timestamp:
08/24/11 13:03:50 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
eccc8bdb94d1f5f65ad773f30e8fd9484a52126e
Message:

Use distutils.sysconfig to get the proper python module filename extension.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orangeqt/modules/SIPMacros.cmake

    r8171 r8757  
    123123        ADD_LIBRARY(${_logical_name} SHARED ${SIP_EXTRA_SOURCES} ${_sip_output_files} ) 
    124124    ENDIF (CYGWIN) 
    125     IF (WIN32) 
    126         SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX ".pyd") 
    127     ENDIF (WIN32) 
     125     
     126#   IF (WIN32) 
     127#       SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX ".pyd")  
     128#   ENDIF (WIN32) 
     129 
     130#   Use sysconfig to get the python module extension 
     131    execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('SO')"  
     132                    RESULT_VARIABLE PYTHON_SOPY_PROCESS  
     133                    OUTPUT_VARIABLE PY_SO_SUFFIX  
     134                    OUTPUT_STRIP_TRAILING_WHITESPACE) 
     135    SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX ${PY_SO_SUFFIX}) 
    128136    TARGET_LINK_LIBRARIES(${_logical_name} ${PYTHON_LIBRARY} ${SIP_EXTRA_LINK_LIBRARIES} ${EXTRA_LINK_LIBRARIES}) 
    129137    SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES PREFIX "" OUTPUT_NAME ${_child_module_name}) 
Note: See TracChangeset for help on using the changeset viewer.