After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790550 - FTBFS: missing __init__.py
FTBFS: missing __init__.py
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Python Bindings
2.7.x
Other Linux
: Normal major
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2017-11-18 22:43 UTC by Dmitry Smirnov
Modified: 2018-06-30 00:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Full build log of 2.7.2 in Debian, demonstrates tests failures. (71.38 KB, application/x-xz)
2017-11-27 22:01 UTC, Dmitry Smirnov
Details

Description Dmitry Smirnov 2017-11-18 22:43:58 UTC
On Debian GnuCash 2.7.1 FTBFS as follows:

~~~~
make[5] Entering directory '/build/gnucash-2.7.1/bindings/python'
/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -I/usr/include/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../common -I../../libgnucash/engine -I../../gnucash/gnome-utils -I../../libgnucash/app-utils -I../../libgnucash/gnc-module -I../../gnucash/gnome -I../../libgnucash/core-utils -I../../libgnucash/gnc-module -Wdate-time -D_FORTIFY_SOURCE=2 -w -g -O2 -fdebug-prefix-map=/build/gnucash-2.7.1=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu11 -c -o _gnucash_core_c_la-gnucash_core.lo `test -f 'gnucash_core.c' || echo './'`gnucash_core.c
make[5] *** No rule to make target '__init__.py', needed by '.py-links'.  Stop.
~~~~

I also tried building with CMAKE that failed somewhat similar:

~~~~
CMake Error at bindings/python/CMakeLists.txt:92 (FILE): 
  FILE COPY cannot find "/build/gnucash-2.7.1/bindings/python/__init__.py". 
~~~~
Comment 1 Geert Janssens 2017-11-26 12:32:32 UTC
This should be fixed for the upcoming 2.7.2 release:
https://github.com/Gnucash/gnucash/commit/961cb5a829bb325525652429886aeed71e6d4483

Thanks for pointing this out.
Comment 2 Dmitry Smirnov 2017-11-26 22:00:39 UTC
Thanks. I tried this patch but it makes build to fail earlier in Cmake stage:

~~~~
-- Looking for include file wctype.h 
-- Looking for include file wctype.h - found 
CMake Error at bindings/python/CMakeLists.txt:92 (FILE): 
  file COPY cannot find 
  "/mnt/tmpssd/src/gnucash/gnucash-2.7.1/bindings/python/__init__.py". 
~~~~
Comment 3 John Ralls 2017-11-27 04:19:11 UTC
Right, because the patch affects what gets put in the tarball, not how the tarball is subsequently built.

I released 2.7.2 this morning. Switch to building that and open a new bug if you still have problems with building the python bindings.
Comment 4 Dmitry Smirnov 2017-11-27 13:20:26 UTC
Thanks, it is much better in 2.7.2. 

However now there is a following error that reminds me of #752203:

~~~~
        Start 105: python-bindings 
105/105 Test #105: python-bindings ..............................***Failed    0.08 sec 
* 13:13:46  WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 
* 13:13:46  WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 
* 13:13:46  WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 
* 13:13:46  WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 
* 13:13:46  WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 
Traceback (most recent call last): 
  • File "/build/gnucash-2.7.2/bindings/python/tests/runTests.py.in", line 12 in <module>
    from test_split import TestSplit
  • File "/build/gnucash-2.7.2/bindings/python/tests/test_split.py", line 4 in <module>
    from unittest_support import *
ImportError: No module named unittest_support
~~~~

Please advise.
Comment 5 John Ralls 2017-11-27 17:41:59 UTC
Say "Bug 752203" instead of "#752203". Anyway, doesn't this belong on bug 790845?

Looks like there are two problems: unittest_support.py *is* in the tarball but python doesn't find it. You can copy it to {builddir}/common/test-core and get past that. The second problem is that bindings/python/tests/test_commodities.py didn't get added to the tarball so to get the test to pass you'll need to copy it over from a git clone.
Comment 6 Dmitry Smirnov 2017-11-27 22:01:53 UTC
Created attachment 364534 [details]
Full build log of 2.7.2 in Debian, demonstrates tests failures.
Comment 7 Dmitry Smirnov 2017-11-27 22:04:43 UTC
Sorry, I meant to attach the log to bug 790845...
Comment 8 John Ralls 2018-06-30 00:00:56 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=790550. Please update any external references or bookmarks.