-
Notifications
You must be signed in to change notification settings - Fork 595
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
Submit to PyPI? #148
Comments
I have no idea how to register python binding of tinyobjloader to PIP. Your contribution is always welcome! |
Could be done but i really don't know if it worth it since the module is not so clean and all that plus i don't know what is PIP's policy about that. However if you are reading this post and you also think that it would be a good thing to have this module on PyPI, thumbs up the thread and i will find the time to do it. |
It would probably be quite easy to do using pybind11. It would probably be a bit of a hassle to bind your custom data types but if you used Eigen for that (e.g. A simple objreader would certainly be very welcome in pip - last time I tried a few, the existing ones were not very feature-complete and pyassimp is quite a hassle to install. |
Do you have any good tutorial on register pybind11 + C++ project to PyPI? @patrikhuber Is this close to what you are thinking about? https://stackoverflow.com/questions/42656388/how-to-put-a-swig-pybind11-c-project-on-pypi |
"register" is a bit the wrong word I'd say. It works like this:
You can also locally run But of course you first need to also write the actual bindings. As mentioned in my previous post, if you were willing to use Eigen for your vector types, or You could have a look at this file from my library how I bind my custom |
@patrikhuber Thank you. I've glimpsed pybind11's What I meant is building tinyobj parser as module( For example, an user can load .obj and access its data like a following way
I don't want depending on third party library like Eigen, so I'd like to just wrap tinyobjloader library with pybind11. FYI, there is already a python binding of tinyobjloader using python.h here: https://github.com/syoyo/tinyobjloader/tree/master/python I will investigate how things goes easy by using pybind11 |
I see! So if you've already got a The "only" (actually quite big) thing that pybind11 would then give you is that instead of all this hand-written, version-specific, hard-to-maintain C bindings code, it abstracts all of that away and you can write the bindings in a few simple lines of modern C++. |
I found I need to implement object-oriented API in C++ layer for pybind11, so implemented some classes suitable for pybind11 in https://github.com/syoyo/tinyobjloader/tree/pypi/python @patrikhuber Do you think this approach of API binding is good? If so, I'll implement remaining API bindings(and also implement some C++ classes). Now you can call tinyobj method from python like this
|
https://pypi.org/project/tinyobjloader/ Uploaded to PyPi. Not perfect but most features should work well. |
Dear authors,
Is there any plans to submit tinyobjloader to the the Python Package Index?
It would be awesome if we can simply install it using 'pip'.
The text was updated successfully, but these errors were encountered: