python-gnucash: Some Python files needed for higher-level GnuCash API are not packaged.
(reportbug output) (posted here as per backports FAQ)
Package: python-gnucash
Version: 1:2.4.10-2~bpo60+1
Severity: normal
*** Please type your report below this line ***
(Note: this problem is specific to squeeze-backports, in Wheezy the files seem to be correctly installed)
In order to use the Session, Book, Account and other higher-level objects in
Python you need to from gnucash import Session" (etc). However, the necessary
Python object wrapper code files, such __init__.py, etc. were not installed.
Output of `dpkg -L python-gnucash`:
$ dpkg -L python-gnucash
/.
/usr
/usr/share
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/python-gnucash
/usr/share/doc
/usr/share/doc/python-gnucash
/usr/share/doc/python-gnucash/copyright
/usr/share/doc/python-gnucash/changelog.Debian.gz
/usr/share/doc/python-gnucash/examples
/usr/share/doc/python-gnucash/examples/new_book_with_opening_balances.py.gz
/usr/share/doc/python-gnucash/examples/simple_session.py
/usr/share/doc/python-gnucash/examples/simple_test.py
/usr/share/doc/python-gnucash/examples/change_tax_code.py
/usr/share/doc/python-gnucash/examples/simple_sqlite_create.py
/usr/share/doc/python-gnucash/examples/simple_book.py
/usr/share/doc/python-gnucash/examples/simple_invoice_insert.py.gz
/usr/share/doc/python-gnucash/examples/simple_business_create.py.gz
/usr/share/doc/python-gnucash/examples/account_analysis.py.gz
/usr/share/doc/python-gnucash/examples/test_imbalance_transaction.py
/usr/share/doc/python-gnucash/changelog.gz
/usr/lib
/usr/lib/python2.6
/usr/lib/python2.6/dist-packages
/usr/lib/python2.6/dist-packages/gnucash
/usr/lib/python2.6/dist-packages/gnucash/_gnucash_core_c.so
/usr/lib/pyshared
/usr/lib/pyshared/python2.6
/usr/lib/pyshared/python2.6/gnucash
/usr/lib/pyshared/python2.6/gnucash/_gnucash_core_c.so
However if I build the package from source, you can see the missing files in the
build area:
$ find -name "*.py"
<snipped>
./debian/tmp/usr/lib/python2.6/dist-packages/gnucash/function_class.py
./debian/tmp/usr/lib/python2.6/dist-packages/gnucash/gnucash_core.py
./debian/tmp/usr/lib/python2.6/dist-packages/gnucash/gnucash_core_c.py
./debian/tmp/usr/lib/python2.6/dist-packages/gnucash/gnucash_business.py
./debian/tmp/usr/lib/python2.6/dist-packages/gnucash/__init__.py
</snipped>
If I manually copy these files into /usr/lib/python2.6/dist-packages/gnucash/,
I can then use my test program.
Test Program:
from gnucash import Session, Account, Transaction, Split, GncNumeric
Output before manually copying files:
Traceback (most recent call last):
File "DumpAccountTree.py", line 26, in <module>
from gnucash import Session, Account, Transaction, Split, GncNumeric
ImportError: No module named gnucash
No errors after copying the files in place.
-- System Information:
Debian Release: 6.0.1
APT prefers oldstable
APT policy: (610, 'oldstable'), (600, 'oldstable'), (500, 'oldstable-updates')
Architecture: amd64 (x86_64)
Kernel: Linux 3.7.9-amm2-preempt-amd64-grsec (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-gnucash depends on:
ii gnucash 1:2.4.10-2~bpo60+1 personal and small-business financ
ii libart-2.0-2 2.3.21-1 Library of functions for 2D graphi
ii libatk1.0-0 1.30.0-1 The ATK accessibility toolkit
ii libbonobo2-0 2.24.3-1 Bonobo CORBA interfaces library
ii libbonoboui2-0 2.24.3-1 The Bonobo UI library
ii libc6 2.11.3-3 Embedded GNU C Library: Shared lib
ii libcairo2 1.10.2-6~bpo60+1 The Cairo 2D vector graphics libra
ii libfontconfig1 2.8.0-2.1 generic font configuration library
ii libfreetype6 2.4.2-2.1 FreeType 2 font engine, shared lib
ii libgconf2-4 2.28.1-6 GNOME configuration database syste
ii libglade2-0 1:2.6.4-1 library to load .glade files at ru
ii libglib2.0-0 2.24.2-1 The GLib library of C routines
ii libgnome2-0 2.30.0-1 The GNOME library - runtime files
ii libgnomecanvas2-0 2.30.1-1 A powerful object-oriented display
ii libgnomeui-0 2.24.3-1 The GNOME libraries (User Interfac
ii libgnomevfs2-0 1:2.24.3-1 GNOME Virtual File System (runtime
ii libgtk2.0-0 2.20.1-2 The GTK+ graphical user interface
ii libice6 2:1.0.6-2 X11 Inter-Client Exchange library
ii liborbit2 1:2.14.18-0.1 libraries for ORBit2 - a CORBA ORB
ii libpango1.0-0 1.28.3-1+squeeze2 Layout and rendering of internatio
ii libpopt0 1.16-1 lib for parsing cmdline parameters
ii libsm6 2:1.1.1-1 X11 Session Management library
ii libxml2 2.7.8.dfsg-2 GNOME XML library
ii python 2.6.6-3+squeeze6 interactive high-level object-orie
ii python2.6 2.6.6-8+b1 An interactive high-level object-o
python-gnucash recommends no packages.
python-gnucash suggests no packages.
-- no debconf information
--Andrew
Reply to: