UpstandingHackers / hammer

Parser combinators for binary formats, in C. Yes, in C. What? Don't look at me like that.
GNU General Public License v2.0
430 stars 40 forks source link

Add support for Python 3.x bindings #190

Closed moreati closed 4 years ago

moreati commented 5 years ago

I believe I got this atlast mostly right. All unit tests pass on Ubuntu 18.04 with Python 2.7 and Python 3.6. One limitation is that scons tries to reuse files generated for Python 2.x on Python 3.x. As a workaround I use rm -rf build.

To specify the python binary to build with, use scons bindings=... python=<pythonX.Y>.

The bulk of changed lines are due to converting test values from "a" to b"a" literals.