This CL adds support for sub-tests for Go >= 1.7 and adds the needed
fallback code for Go < 1.7.
This allows to run sub-tests in parallel, where each sub-test tests a
backend (py2-cffi, py3-cffi, py3, ...).
This CL renames the old cffi tests as cffi-py2, and adds another
backend: cffi-py3.
cffi-py2 generates a wrapped package with cffi and runs it with python2.
cffi-py3 generates a wrapped package with cffi and runs it with python3.
This CL unifies the test harnesses for the cpython2 and cffi backends.
testPkg now takes a list of backends (via the table value) to compile
against and infers the list of Python VMs to run the resulting artefact
with.
So:
- backend=py2 => python2
- backend=py3 => python3
- backend=cffi => python2 (and, one day, python3 too)
Fixesgo-python/gopy#100.
This CL adds the doc-string of Go variables (if available) to the python
getter and setter functions, for both CPython2 and CFFI.
Update TestBindVars accordingly.
Before this CL we used to prepend the Go package name of a struct to the
python name of the corresponding python class:
>>> import pkg
>>> f = pkg.Foo()
>>> f.bar
caught error: 'pkg.Foo' object has no attribute 'bar'
This CL drops 'pkg' to make the resulting string follow CPython
convention:
>>> import pkg
>>> f = pkg.Foo()
>>> f.bar
caught error: 'Foo' object has no attribute 'bar'
Fixes go-python#gopy/119.
This CL makes sure we are more or less ready for python3.
- import __future__.print_function so python2 can use the same
print(foo, bar) syntax than python3
- use the python3 syntax for catching exceptions
* Pass 'named.go' test.
* Support to generate named type includes slice and array types.
* Add doc.go for bind package.
* Add comments.
* Support __iadd__ for Go slice types.
* Add a 'seq.go' test for the CFFI engine.
* Generating complex64 / complex128 types from a CFFI engine is supported.
* Passing complex types as an argument is supported.
* Create a new test for complex operations.
* Detect functions returning a Go error and make them pythonic (raising an Exception).
* Add tests for it.
Now it only supports 2 return values.
CPy2 and CFFI should support more return values.
Fixes: go-python/gopy#104
- Remove the generating builder python script.
- Now, genCFFI interface is same as the genCpy.
- Support builtin-types Vars and Consts.
- Pass empty.go
- Pass cgo.go
- Pass vars.go
- Pass consts.go
Updates: go-python/gopy#102
This CL adds the initial infrastructure to support CFFI as a backend for gopy.
It also adds the necessary dependencies for Travis-CI to test CFFI.
Updates go-python/gopy#48Fixesgo-python/gopy#87