mlange-42
712090b747
replace deprecated package compilation mode, add NeedsDeps
2023-02-02 15:29:29 +01:00
mlange-42
2725838e76
unquote path
2023-02-02 13:32:38 +01:00
Kevin Zhang
252048177d
Fix
...
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
2022-07-14 14:17:11 -07:00
Kevin Zhang
67b016d61e
Fix
...
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
2022-07-14 14:13:30 -07:00
Kevin Zhang
aa312c13fd
Fix
...
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
2022-07-14 14:10:38 -07:00
Kevin Zhang
591500e321
Add build tags
...
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
2022-07-14 13:58:59 -07:00
pyalex
0b3020d970
use correct LD flags for shared mode
...
Signed-off-by: pyalex <moskalenko.alexey@gmail.com>
2022-06-24 13:51:53 -07:00
Randall C. O'Reilly
9b66a3f22d
a couple of fixes to prevent crashing if package has no files (e.g., go.mod not set properly)
2021-08-31 21:30:13 -07:00
Justin Israel
8ab2cac131
main,bind,_examples: use absolute package imports and make configurable
...
This CL fixes an issue with the way python import statements are generated using an realtive current directory approach that is no longer compatible with python3. The default behavior has been updated to default to a dot-relative absolute package import for "go" and compiled extension, and a configuration option has been exposed from the CLI flags down to the bind package.
A refactor of configuration options was added to avoid further expanding the number of arguments being passed through the system.
Fixes go-python/gopy#239
2021-03-17 22:02:07 +01:00
Randall C. O'Reilly
18091317ea
don't fail on build error -- sometimes it can be irrelevant (e.g., pkg with empty top-level, but valid subdirs)
2020-11-23 17:31:26 -08:00
Randall C. O'Reilly
3e06d5adc0
split up loading of package from parsing, only use the tools packages.Load and remove dependence on GOPATH GoSrcDir -- should now work exclusively with modules. also only build but don't install packages so go/bin doesn't get spammed
2020-11-23 17:18:30 -08: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
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
8d98f0953a
all tests now passing except maps.. also need to test py2
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
8c4f9979b4
added exe command mode -- builds an executable that has all the go packages built-in and can interpreter in non-main thread.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
3d40f84d02
GoPyInitRunFile runs a file (name set using *Set function) using Py_MainRun -- works for GoGi event loop blocking main thread finally..
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
782d3b74c8
more fixes to exclude various things -- excluding python keywords for example. gi now loads and tries to run - might work on linux, but mac requires main thread for loop.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
c960f7e8d5
using golang.org/x/tools/go/packages for package import b/c supports std library packages too
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
cf18fcbf00
major reorg to support multi-packages in one .so all working -- emergent mostly working.
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
d8e3ff78f9
added pkg command, does full recursive generate for entire package -- figured out how to navigate python packages finally..
2019-08-24 10:31:16 +02:00
Randall C. O'Reilly
e85863e9ea
fully functional for go pointers to structs
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
1f9f33ff18
all: split unix/windows support
2019-01-16 10:58:11 +01:00
Ondřej Herman
27ed2609d3
gopy/bind: do not link cffi bindings against libpython
2018-12-19 10:29:49 +01:00
Sebastien Binet
0ab5a46669
gopy: apply golint fixes
2017-08-10 09:11:48 +02:00
Dong-hee Na
2bad8a4b16
bind, gencffi: Remove generating builders and support Vars and Consts.
...
- 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
2017-06-14 09:52:02 +00:00
Dong-hee Na
6456a228f7
gopy, bind: add initial boilerplate code for cffi support
...
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#48
Fixes go-python/gopy#87
2017-06-08 15:56:49 +00:00
Sebastien Binet
90f5fcd36e
gopy: load from export data, not source
...
This CL, inspired from https://golang.org/cl/16911 , drops the use of
`x/tools/go/loader` (importing from sources) and replaces it with the stdlib
`go/importer`, working off the (binary) exported data under
$GOPATH/pkg/pkgname.a.
This allows us:
- to rely completely on the stdlib-1.5,
- to support cgo-based packages (which are not supported by `x/tools/go/loader`)
Fixes #28
Fixes #36
Fixes #68
Fixes #70
Change-Id: I0321645dfeec8738687a675a7e80283053c89123
2015-11-16 13:37:00 +01:00
Sebastien Binet
e44991867d
all: use go/types from stdlib-1.5
...
Updates #28 .
Change-Id: Id56c7ea1257086f819f466a0f058f34dc038fd9b
2015-11-16 12:54:02 +01:00
Sebastien Binet
daf017bd41
bind: discover pkgconfig package name
...
This CL enhances gengo with the ability to discover the latest python.pc
package name and adds it to the #cgo pkgconfig pragma.
Fixes #51 .
Change-Id: If4d46d6fe90731df6b2cb4f9c39fb3ec967e7330
2015-08-31 10:23:57 +02:00
Sebastien Binet
d2af1972fd
gopy: initial support for packages with cgo files
...
Change-Id: Ied3d140437c302c31ee3dfd9b832bc6e43ac97f3
2015-08-10 09:12:51 +02:00
Sebastien Binet
58ae68958f
all: wire in cpython API version
...
Change-Id: Ic09f7face9a7d65220474eb62a1a5dfe09d9d4cf
2015-08-05 14:13:37 +02:00
Sebastien Binet
63c5bca8e1
gopy: proper handling of lang option
...
This CL introduces a split in handling of {py|py2|py3}{thon,}.
It also lifts up the bind.Package creation so the processing is done only once.
Change-Id: I946605fb24885df986baa77088f76df90ff4d168
2015-08-03 14:26:34 +02:00
Sebastien Binet
3be107f119
bind: introduce Struct, Func and Method
...
this CL introduces bind.{Struct,Func,Method} types to collect informations
about types.
- rationalize cpython type strings
- generate cgo stub functions, calling structs methods
- generate (invalid) bodyless cpython functions for struct methods
2015-07-27 18:47:18 +02:00
Sebastien Binet
2dcedc58eb
all: better clean-up after gopy bind
2015-07-24 16:26:27 +02:00
Sebastien Binet
744ab46aef
all: gopy-gen -> gopy
2015-07-24 16:16:31 +02:00
Sebastien Binet
131b1f1f41
gopy-gen: bridge in go/doc.Package
2015-02-02 10:32:52 +01:00
Sebastien Binet
9d0889d184
gopy-gen: first import
2015-01-30 18:01:15 +01:00