rename project to github.com/go-python/cpy3

master
Christian Korneck 2021-10-24 14:08:10 +02:00
parent 8eaf2611eb
commit 374f36bb22
7 changed files with 28 additions and 15 deletions

View File

@ -2,7 +2,7 @@ version: 2
templates: templates:
job_template: &job_template job_template: &job_template
working_directory: /go/src/github.com/DataDog/go-python3 working_directory: /go/src/github.com/go-python/cpy3
docker: docker:
- image: golang:1.11.2 - image: golang:1.11.2

View File

@ -1,3 +1,5 @@
# Contributing # Contributing
Please, open issues and submit PRs on https://github.com/DataDog/go-python3 using the provided templates. Please, open issues and submit PRs on https://github.com/go-python/cpy3 using the provided templates.
Backward compatibility is a priority. Please, avoid introducing breaking changes. (Exceptions need a good reason).

View File

@ -1,6 +1,8 @@
MIT License MIT License
Copyright (c) 2018 Datadog, Inc. Copyright (c) 2018 - 2021 Datadog, Inc.
Copyright (c) 2018 - 2021 Contributors to the DataDog/go-python3 project
Copyright (c) 2021 Contributors to the go-python/cpy3 project
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@ -18,4 +20,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.

View File

@ -1,18 +1,22 @@
**This repo will be archived on December 1st 2021. While still readable it will no longer be maintained.** # Go bindings for the CPython-3 C-API
# go-python3
**Currently supports python-3.7 only.** **Currently supports python-3.7 only.**
Golang bindings for the C-API of CPython-3.
This package provides a ``go`` package named "python" under which most of the This package provides a ``go`` package named "python" under which most of the
``PyXYZ`` functions and macros of the public C-API of CPython have been ``PyXYZ`` functions and macros of the public C-API of CPython have been
exposed. Theoretically, you should be able use https://docs.python.org/3/c-api exposed. Theoretically, you should be able use https://docs.python.org/3/c-api
and know what to type in your ``go`` program. and know what to type in your ``go`` program.
## relation to `DataDog/go-python3`
This project was inspired by https://github.com/sbinet/go-python. Go and take a look if we need something for python-2.7! This project is a community maintained successor to [`DataDog/go-python3`](https://github.com/DataDog/go-python3), which will get archived in December 2021.
- If you use the Go package `github.com/DataDog/go-python3` in your code, you can use `github.com/go-python/cpy3` as a drop-in replacement. We intend to not introduce breaking changes.
- If you have unmerged PRs or open issues on `DataDog/go-python3`, please re-submit them here.
## relation to `sbinet/go-python`
This project was inspired by [`sbinet/go-python`](https://github.com/sbinet/go-python) (Go bindings for the CPython-2 C-API).
# Install # Install
@ -28,7 +32,7 @@ the `PKG_CONFIG_PATH` environment variable.
## Go get ## Go get
Then simply `go get github.com/DataDog/go-python3` Then simply `go get github.com/go-python/cpy3`
# API # API
@ -47,4 +51,9 @@ and error will be set if we failed to open `filename`.
If an error is raise before calling th CPython function `int` default to `-1`. If an error is raise before calling th CPython function `int` default to `-1`.
Take a look at some [examples](examples) Take a look at some [examples](examples) and this [tutorial blogpost](https://poweruser.blog/embedding-python-in-go-338c0399f3d5).
# Contributing
Contributions are welcome! See [details](CONTRIBUTING.md).
This project follows the [Go Community Code of Conduct](https://golang.org/conduct).

View File

@ -11,7 +11,7 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/DataDog/go-python3" python3 "github.com/go-python/cpy3"
) )
func main() { func main() {

View File

@ -11,7 +11,7 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/DataDog/go-python3" python3 "github.com/go-python/cpy3"
) )
func main() { func main() {

View File

@ -12,7 +12,7 @@ import (
"fmt" "fmt"
"os" "os"
python "github.com/DataDog/go-python3" python "github.com/go-python/cpy3"
) )
var ( var (