TkTech / pysimdjson

Python bindings for the simdjson project.
https://pysimdjson.tkte.ch
Other
643 stars 54 forks source link

Provide the ability to link to system simdjson #80

Open mgorny opened 3 years ago

mgorny commented 3 years ago

Bundling a library is a serious sin in our book, so provide the ability to link to the system library. I've also done some refactoring to avoid exponential growth of Extension calls. The default behavior remains the same, so it shouldn't affect existing users.

That said, the patch isn't perfect. It still uses the bundled headers instead of system headers but it should be good enough for us.

TkTech commented 3 years ago

Happy to support this as an opt-in. I'm assuming this is for Gentoo, in which case the package maintainer will ensure its linking against the right version? Or do we need to do a sanity in the setup.py?

mgorny commented 3 years ago

Yes, we'll handle the right deps ourselves, as well as stripping simdjson.h to ensure linking against the system header (I couldn't think of an easy way to do that).