Make requests python package to be detected in the same way as numpy

This solves missing requests package reported on the systems where it's
located in dist-packages rather than in site-packages.

To do this there's now a helper macros which handles both requests and
numpy now and could be used for more packages in the future.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D686
This commit is contained in:
Sergey Sharybin
2014-07-28 20:42:30 +06:00
parent c4b47b89f7
commit c85265b455
3 changed files with 57 additions and 53 deletions

View File

@@ -539,7 +539,7 @@ if(UNIX AND NOT APPLE)
# Copy requests, we need to generalize site-packages
if(WITH_PYTHON_INSTALL_REQUESTS)
install(
DIRECTORY ${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/requests
DIRECTORY ${PYTHON_REQUESTS_PATH}/requests
DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/site-packages
PATTERN ".svn" EXCLUDE
PATTERN "__pycache__" EXCLUDE # * any cache *