Skip to content

Commit 33bfb7e

Browse files
committed
add document about supporting python3
1 parent d51bc18 commit 33bfb7e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ other *.go, for example "pydatetime.go"
2626
```
2727

2828

29-
Currently py package library use pkg-config to link "Python.h". User needs to set up pkg-config and "python-2.7.pc".
29+
Currently py package library use pkg-config to link "Python.h". User needs to set up pkg-config and "python-2.7.pc" (or python-3.x.pc).
3030

3131
## Example to set up pkg-config (with pyenv)
3232

@@ -46,6 +46,17 @@ When python is installed as static object (*.so), error will be occurred on bui
4646
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -v <version>
4747
```
4848

49+
## Use python3
50+
51+
This py plugin supports Python2.7 on default. If build py plugin under Python3.x, build modules using `--tags` option, like:
52+
53+
```sh
54+
build_sensorbee --only-generate-source=true
55+
go build --tags=py3.5 -o sensorbee sensorbee_main.go
56+
```
57+
58+
Currently py package supports "py3.4", "py3.5" and "py3.6" tags. This support option using build constraints is beta version and it is possible to change in future.
59+
4960
# Default UDS/UDF
5061

5162
## pystate
@@ -230,6 +241,5 @@ sample_module.sample_module_method(arg1, arg2)
230241

231242
# Attention
232243

233-
* sensorbee/py supports only python2.x, not support 3.x
234244
* on windows OS, user need to customize cgo code to link between go and python.
235245
* To reload updated modules, need to re-run SensorBee. Python modules are imported when SensorBee setup to run, and cannot reload modifies python modules in SensorBee running.

0 commit comments

Comments
 (0)