Closed YutingZhang closed 3 years ago
I would, but the problem is that I am currently using Pybind11 which only produces libraries compatible with a specific version of the Python runtime. So if I published a build for 3.7 it would not work with 3.6 or 3.8. I was not aware of that when I started using Pybind11. It is something I am looking into. Everyone recommends Pybind11 for C++ projects but they fail to mention their generated binary interfaces are incompatible from minor version to minor version. If there is anything I am missing or a way to overcome this, please let me know.
It's not a deficit of pybind11. Every Python package which uses native code depends on the specific binary interface of the minor version. But that is not an issue. Multiple wheel files (eg. doxapy-1.0-cp37-cp37m-win_amd64.whl and doxapy-1.0-cp38-cp38-win_amd64.whl) can be pre-built and uploaded to pypi.
The "limited API" which would allow one build compatible with multiple minor versions is not commonly used in practice.
Creating multiple wheels for every new minor release is not feasible for this project. Since PyBind11 does not provide a stable ABI, I will sadly have to move away from that technology. I had no clue that would be the case until I was almost finished and about to package it up. If I cannot maintain it, I do not want to offer it and by rewriting the wrapper without the syntactic sugar of PyBind11, I should be able to create a package that I can maintain. That said, it may take some time.
If anyone else is interested in this python library being published for pip, please let me know. I am leaving this issue open. If anyone is interested in helping rewrite the python wrapper to something that can support multiple minor versions of Python, we can create a branch or accept a related pull request.
It should not be very difficult to create a Github Actions script which auto builds multiple versions and publishes them to pypi automatically. I will try to find the time to set this up.
EDIT: I found some time https://github.com/brandonmpetty/Doxa/pull/19
Will this make Doxa work on Linux with a single pip
command? Because I'm currently totally failing in building the project on/for Linux :(
@heinrich-ulbricht yes it should. it's generating binary files for linux. So pip should install these without having to build anything.
@Dobatymo That sounds wonderful. I hope @brandonmpetty finds the time to test your PR. If there is anything to test from pypi I'm here :)
Good to know @heinrich-ulbricht . Been swamped lately but hoping to have it setup Oct 2 or 3.
@Dobatymo, Thank you again for the PR. I made a few additional changes and it looks like everything is running great! https://pypi.org/project/doxapy
@YutingZhang @heinrich-ulbricht, check it out and let me know if you run into any issues.
There is one issue with update_to_binary
where it is not passing the algorithm params all the way through. I'll get a fix for that out shortly. I also need to try to get Mac OSX working. I think by passing in cxx_std that may force it onto a newer Mac OS (10.14+) which I think is required for proper C++17 support. I got it working on a much earlier version, but it required a customized build setup.
https://pypi.org/project/doxapy/0.9.1
I added MacOS X support, although I can't test it due to me running an older OS. It requires 10.14+. See the release notes for other details: https://github.com/brandonmpetty/Doxa/releases
To comment on anything related to the release on PyPi: https://github.com/brandonmpetty/Doxa/discussions/22
Any plan to support pip install for the Python binding? Thank you