Randall C. O'Reilly
aa5494263e
readme cleanup now that possibly working
2020-10-27 03:38:01 -07:00
Randall C. O'Reilly
910e17cc77
use bind/GetPythonConfig for cmd_build instead of its own separate code for that -- fixes building on mac..
2020-10-26 20:37:07 -07:00
Randall O'Reilly
c89dca98b6
Merge pull request #202 from tomoris/master
...
Fix comments, Examples in README.md
2020-10-26 16:27:25 -07:00
Randall C. O'Reilly
b9902d7dc3
add a -no-make flag, which prevents overwriting the generated Makefile when run from the Makefile. add extra -Wno-error -Wno-implicit-function-declaration CFLAGS to fix Xcode 12 and make actual errors more visible
2020-09-19 18:03:45 -07:00
Randall O'Reilly
6d8fa23dbe
Merge pull request #230 from rcoreilly/master
...
for slices with non-pointer struct element types, need to return pointer to element
2020-09-16 03:02:37 -07:00
Randall C. O'Reilly
668e31d12c
add support for Enum types in Python, based on const values of the same type in Go. Also generates the raw const values at global package scope, as accessed in Go.
2020-09-15 05:08:47 -07:00
Randall C. O'Reilly
fcba59424b
fix for getting doc string for functions that return a type defined in the package: the doc is found under the type.. fixes missing gopy:interface=handle comment for such functions.
2020-09-14 03:53:39 -07:00
Randall C. O'Reilly
f802d38242
support subslicing of slices that returns the new Go slice -- was just returning a Python list from elements -- Go-based code then broke with that.
2020-09-11 05:12:53 -07:00
Randall C. O'Reilly
7c8a930907
support pass-through of nil value for slices and maps -- otherwise causes immediate error in generated boilerplate for nil values passed for these. also fix gopy: comment parsing.
2020-09-11 03:00:49 -07:00
Randall C. O'Reilly
1ae2f24440
for slices with non-pointer struct element types, need to return pointer to element so that elements can be modified -- no other way to do this python-side, and generated code assumes pointer receivers
2020-09-09 12:53:25 -07:00
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
tomoris
7f3fcd1181
comment fix
2019-10-20 21:39:39 +09: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