You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 10, 2022. It is now read-only.
@@ -8,23 +9,26 @@ This package provides a ``go`` package named "python" under which most of the
8
9
exposed. Theoretically, you should be able use https://docs.python.org/3/c-api
9
10
and know what to type in your ``go`` program.
10
11
11
-
Currently supports python-3.7+.
12
12
13
13
This project was inspired by https://github.com/sbinet/go-python. Go and take a look if we need something for python-2.7!
14
14
15
-
Install
16
-
-------
15
+
# Install
16
+
17
+
## Deps
17
18
18
-
Simply `go get github.com/DataDog/go-python3`
19
+
We will need `pkg-config` and a working `python3.7` environment to build these
20
+
bindings. Make sure you have Python libraries and header files installed as
21
+
well (`python3.7-dev` on Debian or `python3-devel` on Centos for example)..
19
22
23
+
By default `pkg-config` will look at the `python3` library so if you want to
24
+
choose a specific version just symlink `python-X.Y.pc` to `python3.pc` or use
25
+
the `PKG_CONFIG_PATH` environment variable.
20
26
21
-
Build
22
-
-----
27
+
## Go get
23
28
24
-
We will need `pkg-config` and a working `python3` environment to build these bindings. By default `pkg-config` will look at the `python3` library so if you want to choose a specific version just symlink `python-X.Y.pc` to `python3.pc` or use the `PKG_CONFIG_PATH` environment variable.
29
+
Then simply `go get github.com/DataDog/go-python3`
25
30
26
-
API
27
-
---
31
+
# API
28
32
29
33
Some functions mix go code and call to Python function. Those functions will
30
34
return and `int` and `error` type. The `int` represent the Python result code
@@ -41,4 +45,4 @@ and error will be set if we failed to open `filename`.
41
45
42
46
If an error is raise before calling th CPython function `int` default to `-1`.
0 commit comments