Navigation Menu

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

Fix build python bindings #1008

Merged
merged 7 commits into from Nov 28, 2018
Merged

Fix build python bindings #1008

merged 7 commits into from Nov 28, 2018

Conversation

jdumas
Copy link
Collaborator

@jdumas jdumas commented Nov 12, 2018

I know we have new python bindings in the work, but right now the ones we have are not usable anymore.

  • If compiled with LIBIGL_USE_STATIC_LIBRARY=ON, there will be missing symbols at runtime.
  • I also fixed the path of the tutorial data in shared.py.
  • Added an error message if someone tries to run cmake from the python/ folder without the correct options.
  • Once this is merged, I'll put a big warning on the website that people should compile with LIBIGL_USE_STATIC_LIBRARY=ON if they want to use the python bindings.
  • Also fixed a cmake issue with the line target_link_libraries(pyigl PUBLIC igl::core), that meant properties of igl::core were not correctly propagated before (including -fPIC).
  • Since most python tutorials are marked as executable, I've also added a magic comment at the beginning so they can be run directly ./102_DrawMesh.py

Testing and integrating the new python bindings will take some time (a couple of weeks at least), so this needs to patched in the meantime.

Check all that apply (change to [x])

@jdumas
Copy link
Collaborator Author

jdumas commented Nov 13, 2018

Yes, it builds now! I've had to update a couple of third-party libraries (tetgen, triangle, stb_image, glad and comiso), but I've removed the hack around the -fPIC flag (it is now properly propagated without messing with the CXX_FLAGS globally).

Copy link
Collaborator

@fwilliams fwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, the old bindings work with python 2.7. Maybe change the shebangs to python instead of python3 so we don't break people running in an environment with 2.7.

@jdumas
Copy link
Collaborator Author

jdumas commented Nov 28, 2018

Blergh, who uses python 2 anymore nowadays ...

@fwilliams fwilliams merged commit b87a8b2 into libigl:dev Nov 28, 2018
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.

None yet

2 participants