diff --git a/.circleci/config.yml b/.circleci/config.yml index 10fad98..580bf49 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 templates: job_template: &job_template - working_directory: /go/src/github.com/DataDog/go-python3 + working_directory: /go/src/github.com/go-python/cpy3 docker: - image: golang:1.11.2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab36fe3..8c70f4e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,5 @@ # Contributing -Please, open issues and submit PRs on https://github.com/DataDog/go-python3 using the provided templates. \ No newline at end of file +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). \ No newline at end of file diff --git a/LICENSE b/LICENSE index f2bc383..ebbe328 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,8 @@ 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 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 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 -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 4c95eba..b7f6057 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,22 @@ -**This repo will be archived on December 1st 2021. While still readable it will no longer be maintained.** - -# go-python3 +# Go bindings for the CPython-3 C-API **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 ``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 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 @@ -28,7 +32,7 @@ the `PKG_CONFIG_PATH` environment variable. ## Go get -Then simply `go get github.com/DataDog/go-python3` +Then simply `go get github.com/go-python/cpy3` # 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`. -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). \ No newline at end of file diff --git a/examples/list/main.go b/examples/list/main.go index 5caae40..45a9a15 100644 --- a/examples/list/main.go +++ b/examples/list/main.go @@ -11,7 +11,7 @@ import ( "fmt" "os" - "github.com/DataDog/go-python3" + python3 "github.com/go-python/cpy3" ) func main() { diff --git a/examples/python3/main.go b/examples/python3/main.go index 493256c..dccc4df 100644 --- a/examples/python3/main.go +++ b/examples/python3/main.go @@ -11,7 +11,7 @@ import ( "fmt" "os" - "github.com/DataDog/go-python3" + python3 "github.com/go-python/cpy3" ) func main() { diff --git a/script/variadic.go b/script/variadic.go index 11f4a5f..4c06d34 100644 --- a/script/variadic.go +++ b/script/variadic.go @@ -12,7 +12,7 @@ import ( "fmt" "os" - python "github.com/DataDog/go-python3" + python "github.com/go-python/cpy3" ) var (