[Bf-blender-cvs] [a19c278] master: Include modules needed for Python to run pip
Campbell Barton
noreply at git.blender.org
Mon Feb 29 21:45:35 CET 2016
Commit: a19c278551b8d23e2255479ca0e03d54ecc2388d
Author: Campbell Barton
Date: Tue Mar 1 07:34:18 2016 +1100
Branches: master
https://developer.blender.org/rBa19c278551b8d23e2255479ca0e03d54ecc2388d
Include modules needed for Python to run pip
This means Python developers can install pip using Blender's bundled Python.
===================================================================
M source/creator/CMakeLists.txt
===================================================================
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 765f98b..676e869 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
More information about the Bf-blender-cvs
mailing list