Cosmos Nicolaou
ac88620b22
_examples,bind: add a test for types.Named
...
This CL adds a test for #220 .
2020-03-27 18:58:43 +01:00
Randall C. O'Reilly
87be7f7b22
bind: add no-warn flag; use underlying type for Named types for struct fields; use overall package name for DecRef etc.
...
Fixes #219
Fixes #220
Fixes #221
2020-03-26 08:30:42 +01:00
Cosmos Nicolaou
299c7e9a43
gopy,bind: fix storage leaks due to C.Cstring allocations w/ pybindgen
...
As noted in #186 the use of C.Cstring in conjunction with pybindgen leads to storage leaks. This CL attempts at fixing those by patching the output of pybindgen to call free on the leaked strings.
NOTE, that I plan to look at pybindgen to add an option to it so that it can generate the correct code. In the meantime, I think this change is useful to have since it makes the generated code much more usable.
Fixes #186 .
2020-02-19 09:31:07 +01:00
Cosmos Nicolaou
5266c83347
gopy,bind: improve error reporting for python-incompatible methods and funcs
2020-02-19 09:26:10 +01:00
Cosmos Nicolaou
35472c0b14
gopy,gopyh,bind: allow for deletion of handles from the map in gopyh
...
- add support for deleting gopyh handles
- add support for checking arguments' type
Fixes #217 .
2020-02-18 22:59:10 +01:00
Cosmos Nicolaou
d635ab6cf5
gopy: fix go.mod used in tests to allow for spaces in path names
2020-02-17 14:07:37 +01:00
Cosmos Nicolaou
3b6e67ffd2
gopy: fix tests to work with go modules
2020-02-13 13:56:10 +01:00
Cosmos Nicolaou
6fbd665bfb
bind: improve error reporting for python incompatible methods
...
* improve error reporting
* remove spurious printf
2020-02-13 13:52:35 +01:00
Sebastien Binet
9e8b8161ae
gopy: apply goimports
2020-02-10 16:35:56 +01:00
Keithcat1
c13194e4fb
gopy: add environment variable support
2020-02-10 16:34:42 +01:00
Sebastien Binet
c29e95e5ce
bind: use python case for booleans
...
Fixes #207 .
2019-12-30 16:54:23 +01:00
Sebastien Binet
3b145be9f2
ci: add Go-1.13 ( #200 )
2019-09-30 15:42:08 +02:00
Sebastien Binet
7e6560ef62
bind: slice elem method auto-wraps the handle, also maps
...
* fixes issue #191 (slice elem method auto-wraps the handle, including extra tests in slices), and fixes py wrapper imports to include everything referenced.
* also wrap handles for map __getitem__
* also rm gopy exe
* update after previewing PR: remove gopy.gide, don't print extra py imports, undo one usage change.
* one more cmd-exe fix
2019-09-30 15:32:05 +02:00
Amit Lavon
7268a64f4a
bind: fix IncDir to work with forward slashes
...
On Windows it is populated with backslashes, which GCC doesn't like. This fix should make it work on windows.
Fixes go-python/gopy#193 .
2019-09-12 18:37:54 +02:00
Sebastien Binet
0e4a864627
gopy: update Go module deps
2019-08-24 10:41:23 +02:00
Sebastien Binet
343fda6cf7
ci: disable py2 in appveyor
2019-08-24 10:31:16 +02:00
Sebastien Binet
fea0a83bbb
ci: drop Go-1.10
2019-08-24 10:31:16 +02:00
Sebastien Binet
b486636dd9
ci: arrange correct test environment (PYTHONUBUFFERED, LD_LIBRARY_PATH)
2019-08-24 10:31:16 +02:00
Sebastien Binet
e3449b5645
ci: add caching of build results
2019-08-24 10:31:16 +02:00
Sebastien Binet
e78a5f4786
gopy: update go module
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
bc5ab2fc60
only run py3 tests for now -- biggish job to add py2 support -- can do later -- will file ticket
2019-08-24 10:31:16 +02:00
Sebastien Binet
ebf4023b7c
conflict resolved in .travis.yml
2019-08-24 10:31:16 +02:00
Sebastien Binet
c65922bea5
ci: add . to LD_LIBRARY_PATH
2019-08-24 10:31:16 +02:00
Sebastien Binet
16f100d343
ci: add pybindgen installation for AppVeyor
2019-08-24 10:31:16 +02:00
Sebastien Binet
6226bd7b37
gopy,bind: add -fPIC --shared, use Windows-friendly pkg-config
2019-08-24 10:31:16 +02:00
Sebastien Binet
5e81fcaa99
ci: disable pypy+pybindgen
2019-08-24 10:31:16 +02:00
Sebastien Binet
9dd544d0f2
ci: fix symlink
2019-08-24 10:31:16 +02:00
Sebastien Binet
705990597a
ci: bump pypy to v7.1.1
2019-08-24 10:31:16 +02:00
Sebastien Binet
01219da007
ci: add --user
2019-08-24 10:31:16 +02:00
Sebastien Binet
9b7d6effe3
ci: remove pypy2
2019-08-24 10:31:16 +02:00
Sebastien Binet
4f200f985f
ci: use curl
2019-08-24 10:31:16 +02:00
Sebastien Binet
a94424378e
ci: remove sudos
2019-08-24 10:31:16 +02:00
Sebastien Binet
79bb732a25
ci: install pybindgen for py{2,3} and pypy{2,3}
2019-08-24 10:31:16 +02:00
Sebastien Binet
62000d7301
ci: remove GODEBUG hack
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
780132b629
final update of goki -> go-python -- my pass should be complete here and now just awaiting final review for PR merge.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
ec3f125415
should be last fixes before switching over paths and pulling from PR etc: added osfile example test, which uses pkg and imports os -- needed some fixes to get os package to parse, including fixing error conversion from string, and dealing with func literals with no arg names. osfile doesn't actually work b/c python import only working after install -- not worth doing install for test.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
e28bf163ce
added __contains__ for maps so std python "in" syntax works for checking keys. added to tests.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
4590bed3b4
add support for 1 return value of a basic type in callbacks: could support other types too with extra testing. also support for optional goRun arg which calls with "go" to run in a different goroutine.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
563b82676c
more PR review fixes -- should be all done -- just doing tests on emergent app to make sure everything works..
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
9e491ab3da
most of PR review comments addressed -- few more to tackle tmrw. haven't changed import paths yet b/c still working out of my dir -- will do that as a last step.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
603eba44c4
go.nil must be explicitly initialized in go.py -- just doing nil = GoClass() doesn't do it.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
d39a3c49d4
added gopy:interface=handle doc directive to interpret interface{} args as handles instead of strings; fix go.nil to be a variable not a class; uncomment RemoveAll for main_test work dir; remove more stuff from maps test out to enable consistency; add tests for go.nil, new interface functionality.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
ac43f200b0
readme updates
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
e381500a36
verified building on py2 and most tests work except for a few minor diffs in output -- calling it good enough for now.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
8d98f0953a
all tests now passing except maps.. also need to test py2
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
0f27b8cc52
readme updates, more expt with method callbacks: it is the cross-threading nature that doesn't work for methods. no way around it so far..
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
ad11d2281e
tried to support method callbacks but couldn't get it to work outside of small test case.. not sure what the issues are. updated readme
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
7d8693d293
copy function for slices, and general fixes for gi, emergent, both of which are working well
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
1787e368e5
put all externals in go.py module for efficiency; added slice, map methods; most of GoGi now working.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
073a7f9649
exe mode working well; needed error checking / printing for PyObject_CallObject callbacks..
2019-08-24 10:31:16 +02:00