pybullet: add support for Anaconda install on Mac OSX, for pip install pybullet, python setup.py install and cmake.
Usage: Also updated pypi to latest, see https://pypi.python.org/pypi?:action=display&name=pybullet&version=0.1.7 Here are a few options for Mac OSX + Anaconda: 1) In the root of the Bullet Physics SDK source tree, run CFLAGS="-DB3_NO_PYTHON_FRAMEWORK" python setup.py install 2) cmake, add the flag -DBUILD_PYBULLET_MAC_USE_PYTHON_FRAMEWORK=OFF 3) Globally, just use pip or pip3: CFLAGS="-DB3_NO_PYTHON_FRAMEWORK" pip install pybullet Option (3) may have an out-of-date pybullet/bullet version.
This commit is contained in:
@@ -11,16 +11,25 @@
|
||||
#include "../SharedMemory/PhysicsClientTCP_C_API.h"
|
||||
#endif //BT_ENABLE_CLSOCKET
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) && (!defined(B3_NO_PYTHON_FRAMEWORK))
|
||||
#include <Python/Python.h>
|
||||
#else
|
||||
#include <Python.h>
|
||||
#endif
|
||||
|
||||
#ifdef B3_DUMP_PYTHON_VERSION
|
||||
#define B3_VALUE_TO_STRING(x) #x
|
||||
#define B3_VALUE(x) B3_VALUE_TO_STRING(x)
|
||||
#define B3_VAR_NAME_VALUE(var) #var "=" B3_VALUE(var)
|
||||
#pragma message(B3_VAR_NAME_VALUE(PY_MAJOR_VERSION))
|
||||
#pragma message(B3_VAR_NAME_VALUE(PY_MINOR_VERSION))
|
||||
#endif
|
||||
|
||||
#ifdef PYBULLET_USE_NUMPY
|
||||
#include <numpy/arrayobject.h>
|
||||
#endif
|
||||
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
#define PyInt_FromLong PyLong_FromLong
|
||||
#define PyString_FromString PyBytes_FromString
|
||||
|
||||
Reference in New Issue
Block a user