sbinet / go-python

naive go bindings to the CPython2 C-API
Other
1.53k stars 138 forks source link

Why not just use pkg-config? #8

Closed tv42 closed 10 years ago

tv42 commented 10 years ago

Hi. I'm left a bit confused about the installation instructions; why go through all that trouble? It seems to work fine for me after this simple patch:

[0 tv@brute ~/go/src/github.com/sbinet/go-python]$ git diff
diff --git i/python.go w/python.go
index c0b9440..3373cf3 100644
--- i/python.go
+++ w/python.go
@@ -1,6 +1,7 @@
 // simplistic wrapper around the python C-API
 package python

+// #cgo pkg-config: python
 //#include "Python.h"
 //#include <stdlib.h>
 //#include <string.h>
sbinet commented 10 years ago

hi,

yeah... I didn't use pkg-config because the name for the pkg-config isn't standardised at all between distros and OSes (ie: python, python2, python-2, python-27, ... ?) in retrospect, fiddling with pkg-config naming in a simple cgo_flags.go file is perhaps somewhat easier than with Makefiles :)

I'll push something today along these lines.

-s