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

Python 3 Bindings #8

Closed
lvxejay opened this issue Jul 29, 2017 · 2 comments
Closed

Python 3 Bindings #8

lvxejay opened this issue Jul 29, 2017 · 2 comments

Comments

@lvxejay
Copy link

lvxejay commented Jul 29, 2017

Any plans for Python 3 support? What would be necessary to generate the proper python bindings for this library?

@jstone-lucasfilm
Copy link
Member

I think this is a great idea, and I believe it should be a relatively straightforward improvement to make to MaterialX.

The core library on which the PyMaterialX module is based (PyBind11) already natively supports Python 3.x, so the main work would be resolving the two changes we've made to PyBind11 for MaterialX, which are listed below:

  • We've extended PyBind11 to support Python 2.6 (natively it only supports Python 2.7 and above).
  • We've added a compile-time flag (PYBIND11_PREFER_PYINT) which allows the developer to choose whether Python methods using integers should prefer objects of Python type 'int' or 'long'.

So far, these two extensions have only been built and unit tested with Python 2.x, so a developer would need to build PyMaterialX with Python 3.x and resolve any issues that come up.

Additionally, the handful of pure-Python wrappers in python/MaterialX would need to be updated for compatibility with Python 3 syntax.

@jstone-lucasfilm
Copy link
Member

Python 3 is now supported, but let us know if you encounter any issues with MaterialX in this environment, since the majority of our testing at Lucasfilm is with Python 2.x.

meshula pushed a commit to meshula/MaterialX that referenced this issue Nov 3, 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

No branches or pull requests

2 participants