Installing Python Bindings

... offonoffoffonoff at gmail.com
Thu Sep 9 22:24:18 EDT 2010


Looks like there is still activity with python bindings.  I wasn't sure
because the website (http://parit.ca/projects/pythongnucash/) hasn't been
updates since 2008, and install instructions refer to gnucash 2.0.4 (I am
running gnucash 2.2.6)

I followed the directions under INSTALL but I did not understand the last
bit about renaming directories and finding headers.

Have all the dependancies (PyCClasses went way smoother than I expected)
I downloaded the gnucash-2,2,6 source code using the script provided.
I untarred/zipped the python-gnucash source into /usr/src
Then I:
sudo mkdir /usr/src/python-gnucash-0.7.55/gnncash_src_c_headers/

I moved all the files from gnucash-2.2.6/src/

but what was that part about manually populating gnucash_c_headers?  I still
get this error:
$ python setup.py build
running build
running build_ext
building 'gnucash._gnucash_c_interface' extension
swigging gnucash/_gnucash_c_interface.i to
gnucash/_gnucash_c_interface_wrap.c
swig -python -Ignucash_c_headers -Ignucash_src_c_headers
-Ignucash_src_c_headers/engine -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include -I/usr/include/gnucash/ -o
gnucash/_gnucash_c_interface_wrap.c gnucash/_gnucash_c_interface.i
gnucash/glib.i:66: Error: Unable to find 'glib/glist.h'
gnucash/_gnucash_c_interface.i:258: Error: Unable to find 'gnucash/Group.h'
/usr/include/gnucash/qofutil.h:54: Error: CPP #error ""No scanf format
string is known for LLD. Fix your ./configure so that the correct one is
detected!"". Use the -cpperraswarn option to continue swig processing.
error: command 'swig' failed with exit status 1

Where are these files supposed to be from?  and I put them into a directory
I create right next to /gnncash_src_c_headers?

I am running Ubuntu 9.04
SWIG is most recent version in package manager
python is 2.6.2

looking forward to playing with this.

Elliot


More information about the gnucash-devel mailing list