Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit 6ed25e3

Browse files
committed
Update Readme to better explain requirement to build the package
1 parent 0ae9380 commit 6ed25e3

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

Diff for: README.md

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
go-python3
2-
==========
1+
# go-python3
2+
3+
**Currently supports python-3.7 only.**
34

45
Golang bindings for the C-API of CPython-3.
56

@@ -8,23 +9,26 @@ This package provides a ``go`` package named "python" under which most of the
89
exposed. Theoretically, you should be able use https://docs.python.org/3/c-api
910
and know what to type in your ``go`` program.
1011

11-
Currently supports python-3.7+.
1212

1313
This project was inspired by https://github.com/sbinet/go-python. Go and take a look if we need something for python-2.7!
1414

15-
Install
16-
-------
15+
# Install
16+
17+
## Deps
1718

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)..
1922

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.
2026

21-
Build
22-
-----
27+
## Go get
2328

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`
2530

26-
API
27-
---
31+
# API
2832

2933
Some functions mix go code and call to Python function. Those functions will
3034
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`.
4145

4246
If an error is raise before calling th CPython function `int` default to `-1`.
4347

44-
Take a look at some [examples](examples)
48+
Take a look at some [examples](examples)

0 commit comments

Comments
 (0)