Building blender on arch linux using the system's python.

Hello

I am on arch linux and I have been using blender from arch’s pacman package manager, however, I decided to build blender my own.

My first building process returned an error:


CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find PythonLibsUnix (missing: PYTHON_LIBRARY PYTHON_LIBPATH
  PYTHON_INCLUDE_DIR PYTHON_INCLUDE_CONFIG_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  build_files/cmake/Modules/FindPythonLibsUnix.cmake:184 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  build_files/cmake/platform/platform_unix.cmake:62 (find_package)
  CMakeLists.txt:948 (include)

I realized that blender needs Python 3.5 to build, so I installed it from AUR. And blender was build and run fine.

My problem is, installing python modules is a tedious process and return a lot of errors as it get confused with pacman’s python. Arch’s version of blender uses the default python in the system and so installing a python module in arch will also install it in blender. How can I do that in my build? How do I make blender use the system python so that its modules are shared.