Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only probe for python if PYBULLET explicitly specified #1409

Merged
merged 1 commit into from
Oct 28, 2017
Merged

only probe for python if PYBULLET explicitly specified #1409

merged 1 commit into from
Oct 28, 2017

Conversation

jl
Copy link
Contributor

@jl jl commented Oct 27, 2017

On Ubuntu 16.04, despite using -DBUILD_PYBULLET=OFF, the build fails with the following error:

CMake Error at build3/cmake/FindPythonLibs.cmake:118 (message):
  Could not find required file 'FindLibPython.py'
Call Stack (most recent call first):
  CMakeLists.txt:317 (FIND_PACKAGE)

If we look at the relevant code in CMakeLists.txt:

FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} EXACT)

which FATAL_ERRORs out when it encounters this logic in FindPythonLibs.cmake

if(NOT _FIND_LIB_PYTHON_PY)
    message(FATAL_ERROR "Could not find required file 'FindLibPython.py'")
endif()

This pull request changes the build behavior so that the environment is not probed at all for any Python libraries unless BUILD_PYBULLET is explicitly set to ON. The previous behavior was to always probe the environment, then set the default value of BUILD_PYBULLET based on whether the probe succeeds.

With this change, developers not interested in PYBULLET can isolate themselves from problems related to Python build going forward. The downside is folks that want PYBULLET and previously relied on the automagic probing behavior will now need to explicitly turn it ON.

Previous work: #1340

@erwincoumans
Copy link
Member

Thank you very much, indeed we shouldn't fail if people don't request Python/pybullet!

@erwincoumans erwincoumans merged commit 0f6bef7 into bulletphysics:master Oct 28, 2017
@jl jl deleted the jl-nopython branch October 28, 2017 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants