-
Notifications
You must be signed in to change notification settings - Fork 224
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
Provide python bindings #5
Comments
I've been pondering this for a week or so, actually, but I'm not sure if C code with Python bindings is sufficiently usable in Python code, or if python-blkmaker should be updated. Nor do I have any experience with writing Python bindings that get installed properly. (Is this something perhaps you could contribute?) |
I was looking into that right now... Normally You don't have to write python at all (http://intermediate-and-advanced-software-carpentry.readthedocs.io/en/latest/c++-wrapping.html) I wrote in the past some FFI classes and ctype interfaces to access C code from python code.. Let's see what I can do with Pyrex.. Or maybe I can help updating the python-blkmaker.. what do you prefer? BTW, this python "miner" getblocktemplate implementation looks good and works even with testnet (all tested with bitcoind 0.12.1) https://github.com/vsergeev/ntgbtminer/blob/master/ntgbtminer.py |
IMO in an ideal world, there would be a pure-Python python-blkmaker and also libblkmaker Python bindings that are interchangeable, but that may take too much time to maintain. The main advantage of python-blkmaker is that users/developers don't need to compile a C library. The main advantage of bindings would be a more common codebase. Gentoo downstream tells me the preferred way to do bindings would be a separate repo for the bindings themselves, using distutils/setuptools for their install. Updating python-blkmaker at this point would require porting:
I've pushed a more recently updated python-blkmaker to https://github.com/luke-jr/python-blkmaker for now. |
There, finished updating python-blkmaker... |
great! One advantage to have the Python wrapper is to use it to unit test the whole lib. Unit test in python is way easier than in C. |
Yes, I'd still welcome Python bindings for that reason. :) |
Hi, since the python-blkmaker is outdated (and it looks unmaintained), wouldn't be a good idea to add python bindings to the libblkmaker?
The text was updated successfully, but these errors were encountered: