Skip to content

Commit

Permalink
fix up python2 scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Mar 20, 2014
1 parent 24ea091 commit 741fba6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions hobu-config.sh
Expand Up @@ -30,9 +30,6 @@ cmake -G "$CONFIG" \
-DWITH_HEXER=ON \
-DWITH_NITRO=ON \
-DWITH_MRSID=ON \
-DPYTHON_EXECUTABLE=/usr/local/bin/python3 \
-DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/libpython3.3.dylib \
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/include/python3.3m/ \
-DMRSID_INCLUDE_DIR=/Users/hobu/dev/release/mrsid/Lidar_DSDK/include \
-DMRSID_LIBRRARY=/Users/hobu/dev/release/mrsid/Lidar_DSDK/lib/liblti_lidar_dsdk.dylib \
-DHEXER_INCLUDE_DIR=${HEXER_HOME}/include \
Expand All @@ -55,3 +52,7 @@ cmake -G "$CONFIG" \
# -DUSE_PDAL_PLUGIN_PCD=ON \
# -DUSE_PDAL_PLUGIN_OCI=ON \
# -DUSE_PDAL_PLUGIN_TEXT=ON \

# -DPYTHON_EXECUTABLE=/usr/local/bin/python3 \
# -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/libpython3.3.dylib \
# -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/include/python3.3m/ \
6 changes: 5 additions & 1 deletion src/plang/Redirector.cpp
Expand Up @@ -130,7 +130,11 @@ Redirector::~Redirector()

PyMODINIT_FUNC redirector_init(void)
{
#if PY_MAJOR_VERSION >= 3
return Redirector::init();
#else
Redirector::init();
#endif
}

#if PY_MAJOR_VERSION >= 3
Expand All @@ -155,7 +159,7 @@ PyObject* Redirector::init()
#if PY_MAJOR_VERSION >= 3
PyObject* m = PyModule_Create(&redirectordef);
#else
PyObject* m = Py_InitModule("redirector", 0, 0);
PyObject* m = Py_InitModule3("redirector", 0, 0);
#endif
if (m)
{
Expand Down

0 comments on commit 741fba6

Please sign in to comment.