conda-forge / openmesh-feedstock

A conda-smithy repository for openmesh.
BSD 3-Clause "New" or "Revised" License
0 stars 6 forks source link

Return type issue (probably caused by Boost) in Python 3.5/3.6 #11

Open BruegelN opened 6 years ago

BruegelN commented 6 years ago

Hi there,

first of all I'd like to thank you for providing such an easy way to integrate openmesh into python projects! Whenever I try to create an openmesh.TriMesh object I get the following error: TypeError: __init__() should return None, not 'NoneType'. To me this sound like an issue with the currently used Boost version. That's why I created #10 . I didn't found a way to somehow check and build the conda-forge package locally, but hopefully the PR solves this issue.

I used OS X 10.13.3 and the latest conda 4.4.11. Only with python 3.5 and 3.6 this issue exists, with python 2.7 it work's like it should. On Ubuntu 16.04 it does work as well (2.7, 3.5 and 3.6).

Step to reproduce on OS X:

xantares commented 6 years ago

can you try again with the new binaries ?

BruegelN commented 6 years ago

Sadly I've to tell that did not work neither with osx-64/openmesh-6.3-py35_4.tar.bz2 nor with osx-64/openmesh-6.3-py36_4.tar.bz2. With the latest build (#4) I get the same error message as mentioned above. For now I'll stick with my ubunutu machine. If I find some time I'll try to compile openmesh+python bindings by myself and try to replicate it/ search for the error. So far I'd like to thank you for your support.

nehaljwani commented 4 years ago

The real reason behind this problem is that the openmesh C++ extension was linking to libpythonXY.so and libpythonXY.a was statically linked into the python interpreter.

otool -L /private/tmp/scratch.nwani/1588539762/dev/lib/python3.6/site-packages/openmesh.so | grep libpython
    @rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version 3.6.0)

More information at: https://gitlab.kitware.com/cmake/cmake/issues/18100

Anyway, the more recent versions of openmesh-python use pybind11 for the python extension which do the right thing.