diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-02-29 23:34:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-02-29 23:37:49 +0300 |
commit | a19c278551b8d23e2255479ca0e03d54ecc2388d (patch) | |
tree | 4717fb9b10fac1bc368d5574b72c20b227dcbf52 | |
parent | c1d05faa24af02e506609f552d32cefcb9bb2996 (diff) |
Include modules needed for Python to run pip
This means Python developers can install pip using Blender's bundled Python.
-rw-r--r-- | source/creator/CMakeLists.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 765f98baab5..676e869e9e8 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -533,10 +533,7 @@ if(UNIX AND NOT APPLE) DIRECTORY ${PYTHON_LIBPATH}/python${PYTHON_VERSION} DESTINATION ${TARGETDIR_VER}/python/${_target_LIB} PATTERN "__pycache__" EXCLUDE # * any cache * - PATTERN "distutils" EXCLUDE # ./distutils PATTERN "lib2to3" EXCLUDE # ./lib2to3 - PATTERN "config" EXCLUDE # ./config - PATTERN "config-*" EXCLUDE # ./config-* PATTERN "site-packages/*" EXCLUDE # ./site-packages/* PATTERN "tkinter" EXCLUDE # ./tkinter PATTERN "lib-dynload/_tkinter.*" EXCLUDE # ./lib-dynload/_tkinter.co @@ -546,6 +543,15 @@ if(UNIX AND NOT APPLE) PATTERN "turtle.py" EXCLUDE # ./turtle.py ) + # Needed for distutils/pip + # get the last part of the include dir, will be 'python{version}{abiflag}', + get_filename_component(_py_inc_suffix ${PYTHON_INCLUDE_DIR} NAME) + install( + FILES ${PYTHON_INCLUDE_DIR}/pyconfig.h + DESTINATION ${TARGETDIR_VER}/python/include/${_py_inc_suffix} + ) + unset(_py_inc_suffix) + # # doesnt work, todo # install(CODE "execute_process(COMMAND find ${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')") @@ -563,7 +569,6 @@ if(UNIX AND NOT APPLE) PATTERN "__pycache__" EXCLUDE # * any cache * PATTERN "*.pyc" EXCLUDE # * any cache * PATTERN "*.pyo" EXCLUDE # * any cache * - PATTERN "distutils" EXCLUDE # ./distutils PATTERN "oldnumeric" EXCLUDE # ./oldnumeric PATTERN "doc" EXCLUDE # ./doc PATTERN "tests" EXCLUDE # ./tests |