Commit Graph

284 Commits

Author SHA1 Message Date
Randall C. O'Reilly 7bbe20f501 field getters and setters 2019-08-24 10:31:16 +02:00
Randall C. O'Reilly 8d44f401d4 py wrapper that puts methods in a class all in place now, and makefile working. build side is good. 2019-08-24 10:31:16 +02:00
Randall C. O'Reilly 30c52c90d3 major progress: function execution all working with pointer args -- encodes type name along with counter and does type-safe checks so it won't fail on the conversion. bind command builds using pybindgen. 2019-08-24 10:31:16 +02:00
Sebastien Binet f5121a0033 all: add support for Go modules 2019-04-25 10:43:01 +02:00
Sebastien Binet e137fd0dfe ci: drop Go1.9, add Go1.12 2019-04-25 10:41:35 +02:00
Sebastien Binet ef9d07f7d4 ci: export GOTRACEBACK=crash 2019-01-16 16:52:19 +01:00
Sebastien Binet 15a7702556 gopy: add AppVeyor badge 2019-01-16 16:29:07 +01:00
Sebastien Binet fc3eff4a2a ci: use PyPy{2,3} from upstream 2019-01-16 16:20:05 +01:00
Sebastien Binet 0d34288a4c ci: enable fast finish in TravisCI 2019-01-16 16:20:05 +01:00
Sebastien Binet 4410fab6cf ci: add pip to windows cache 2019-01-16 16:18:59 +01:00
Sebastien Binet c289190da5 ci: run python in unbuffered mode 2019-01-16 16:18:59 +01:00
Sebastien Binet fbb477f2ae tests: fix exit code 2019-01-16 16:18:59 +01:00
Sebastien Binet 179d004305 bind: declare correct index type in C wrapper __getitem__ 2019-01-16 14:39:55 +01:00
Sebastien Binet 9ca2b97d30 bind: use uintXX_t types 2019-01-16 14:39:55 +01:00
Sebastien Binet 4a8dbd177d all: streamline python VM selection 2019-01-16 10:58:11 +01:00
Sebastien Binet 1f9f33ff18 all: split unix/windows support 2019-01-16 10:58:11 +01:00
Ondřej Herman cbb791395e gopy/bind: pass Go strings to Python as Unicode objects 2019-01-16 09:40:56 +01:00
Ondřej Herman 7712a09f47 gopy/bind: support both byte and Unicode strings as function parameters 2019-01-16 09:40:56 +01:00
Ondřej Herman b43954fc33 gopy/bind: enable subclassing of generated CPython objects 2019-01-15 18:02:29 +01:00
Sebastien Binet d30e0e6a09 ci: add dummy appveyor.yml for Windows CI 2019-01-15 16:41:18 +01:00
Sebastien Binet d1e09f74fd ci: drop 1.8.x, add 1.11.x 2019-01-15 16:15:23 +01:00
Ondřej Herman 27ed2609d3 gopy/bind: do not link cffi bindings against libpython 2018-12-19 10:29:49 +01:00
Ondřej Herman f9e088d468 gopy/bind: add CFFI converters for fixed width integer types 2018-11-29 02:00:51 +09:00
Dong-hee Na 3eb9ef1eef
Merge pull request #168 from ondra/ondra/cffi_sliceptr
gopy/bind: support pointers-to-slices with the cffi backend
2018-11-20 23:15:54 +09:00
Ondřej Herman 710e6acb3f gopy/bind: support pointers-to-slices with the cffi backend 2018-11-19 19:33:30 +01:00
Ondřej Herman 23f4730cd8 gopy/bind: allow renamed Python identifiers to start with an underscore 2018-06-14 11:46:31 +02:00
Ondřej Herman 5f71fa457c gopy/bind: support some instances of pointer-to-slice parameters
Adds support for pointers to slices as output parameters:

    type StrVector []string
    func Fill (out *StrVector) {
        *out = []string{A, B}
    }


Co-authored-by: Ondřej Herman <xherman1@fi.muni.cz>
Co-authored-by: Pavel Rychlý <pary@fi.muni.cz>
2018-06-14 09:12:34 +02:00
Ondřej Herman e50b2d5a63 gopy/bind: implement gopy:name renaming directive
Adds support for changing the names of methods and
functions in the generated Python library. For example,
the following function will be available as under the name
`hello`:

    //gopy:name hello
    func Hello() string { return Hello }


Co-authored-by: Ondřej Herman <xherman1@fi.muni.cz>
Co-authored-by: Pavel Rychlý <pary@fi.muni.cz>
2018-06-14 09:08:42 +02:00
Edward Beech d4b4f9ee3a gopy: fix concurrent map writes during tests 2018-03-27 17:14:09 +02:00
Ramakrishnan G 4b266c45de documentation: Auto-generate support matrix from tests
- Provision to auto-generate / verify support matrix from tests.
- Wrap around long lines > 80 characters in README.md.

Change-Id: Ice93fef8233e8cbc1566e17ae06b51bf79fd43eb
2018-03-27 17:14:09 +02:00
Ramakrishnan G b8f9a2910c gopy: refactor main to assess coverage
- Refactor main() to be able to invoke with custom args from the test.
- Use run() method in unit test to make it possible to assess coverage
  using go test.
2018-03-27 17:14:09 +02:00
Dong-hee Na c6fa07af03 cffi: Fix invalid syntax for slices in generated Python 2018-03-27 14:01:34 +02:00
Sebastien Binet 6958ccb522 Revert "gopy: refactor main to assess coverage"
This reverts commit 9bc9ecdb00.
2018-03-26 11:19:22 +02:00
Sebastien Binet b1e60f126f Revert "documentation: Auto-generate support matrix from tests"
This reverts commit ab145c0f89.

Updates go-python/gopy#159.
2018-03-26 11:19:22 +02:00
Sebastien Binet c99fa35fcb travis: add Go-1.10.x, drop 1.7.x 2018-03-26 11:18:59 +02:00
Sebastien Binet 2dbca92d49 bind: fix pkg-config invocation
Fixes go-python/gopy#155.
2018-03-26 11:11:14 +02:00
Ramakrishnan G ab145c0f89 documentation: Auto-generate support matrix from tests
- Provision to auto-generate / verify support matrix from tests.
- Wrap around long lines > 80 characters in README.md.
- Also adding a .gitignore files excluding some temporary files of vim
  editor.

Change-Id: Ice93fef8233e8cbc1566e17ae06b51bf79fd43eb
2018-01-31 11:36:25 +01:00
Ramakrishnan G b4cc0898d3 test: Running go test without py2-cffi throws errors
- There was a bug in test which didn't disable py2-cffi test backend
  even if cffi module wasn't present on the system. This was because py2
  and py2-cffi were by default part of the enabled backends and were never
  disabled.
- The value for testBackends need to be only a bool instead of an int.
- Added a new environment variable GOPY_TRAVIS_CI used in travis CI.
  go test will panic if not all backends are available when
  GOPY_TRAVIS_CI=1.
- Also added some log messages.

Change-Id: Iae02f81e521bc9ede2caf6ef5e390d4e2ebf671c
2018-01-31 09:31:30 +01:00
Ramakrishnan G 9bc9ecdb00 gopy: refactor main to assess coverage
- Refactor main() to be able to invoke with custom args from the test.
- Use run() method in unit test to make it possible to assess coverage
  using go test.
2018-01-25 17:39:45 +01:00
Sebastien Binet 7cb9dcd10f travis: update for new trusty image 2017-09-15 16:51:56 +02:00
Sebastien Binet d25a96cca0 gopy: make gopy.py module python-3 compliant 2017-09-15 16:41:22 +02:00
Sebastien Binet df98bda46e gopy: remove 1.{5,6}.x from travis, add 1.9.x 2017-08-27 10:19:40 +02:00
Dong-hee Na b237d1d6c6 bind/cffi: support built-in maps
* Support built-in maps.
* Support maps as arguments of a function.
* Support python dictionary as function parameters.
* Add 'maps' test
2017-08-10 20:17:03 +02:00
Sebastien Binet 7138b3be0b gopy: add -work switch to gopy-bind 2017-08-10 17:01:26 +02:00
Sebastien Binet 70ab2b0b03 gopy: add support for sub-tests
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, ...).
2017-08-10 16:26:07 +02:00
Sebastien Binet b2daa0909e gopy: add go vet test 2017-08-10 09:11:48 +02:00
Sebastien Binet 98d59f0c89 all: apply go-vet fixes 2017-08-10 09:11:48 +02:00
Sebastien Binet 0ab5a46669 gopy: apply golint fixes 2017-08-10 09:11:48 +02:00
Dong-hee Na a446b7dcef [cffi]: Updates README.md 2017-08-08 16:52:30 +02:00
Sebastien Binet 0c9b04eaed travis: allow go@master to fail 2017-08-08 16:50:54 +02:00