Skip to content

Commit

Permalink
On windows, ensure python module are located in "Lib" folder.
Browse files Browse the repository at this point in the history
This is required by the code associated to the 'get_python_lib' function
in Lib/distutils/sysconfig.py

Considering that the function 'get_python_lib' is used when building
external package like Numpy, it is particularly important to be compliant
with the file organization imposed by the implementation of the 'get_python_lib'
function.
  • Loading branch information
jcfr committed Mar 28, 2013
1 parent 7a2fdd2 commit e94feac
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Expand Up @@ -105,12 +105,18 @@ if(NOT BUILD_SHARED AND NOT BUILD_STATIC)
endif(NOT BUILD_SHARED AND NOT BUILD_STATIC) endif(NOT BUILD_SHARED AND NOT BUILD_STATIC)


# Set PYTHONHOME # Set PYTHONHOME
set(LIBDIR "lib") set(LIBDIR "Lib") # See Lib/distutils/sysconfig.py - function 'get_python_lib'
if(UNIX)
set(LIBDIR "lib")
endif()
if(USE_LIB64) if(USE_LIB64)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON) set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
set(LIBDIR "lib64") set(LIBDIR "lib64")
endif() endif()
set(PYTHONHOME "${LIBDIR}/${LIBPYTHON}") set(PYTHONHOME "${LIBDIR}")
if(UNIX)
set(PYTHONHOME "${PYTHONHOME}/${LIBPYTHON}")
endif()


# Install tree directory # Install tree directory
set(BIN_INSTALL_DIR bin) # Contains the python executable set(BIN_INSTALL_DIR bin) # Contains the python executable
Expand Down

0 comments on commit e94feac

Please sign in to comment.