BasioMeusPuga / Lector

Qt based ebook reader
GNU General Public License v3.0
1.51k stars 207 forks source link

RecursionError: maximum recursion depth exceeded #37

Closed guoyunhe closed 6 years ago

guoyunhe commented 6 years ago

Hi,

I am trying to build an RPM package. But when building the package, I got this message:

[    9s]   File "/home/abuild/rpmbuild/BUILD/Lector-0.3.1/lector/KindleUnpack/kindleunpack.py", line 183, in <module>
[    9s]     from .unpack_structure import fileNames
[    9s]   File "/home/abuild/rpmbuild/BUILD/Lector-0.3.1/lector/KindleUnpack/unpack_structure.py", line 23, in <module>
[    9s]     from .mobi_utils import mangle_fonts
[    9s]   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
[    9s]   File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked
[    9s]   File "<frozen importlib._bootstrap>", line 894, in _find_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 1157, in find_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 1129, in _get_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 1273, in find_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 1231, in _get_spec
[    9s]   File "<frozen importlib._bootstrap_external>", line 556, in spec_from_file_location
[    9s] RecursionError: maximum recursion depth exceeded
[   10s] error: Bad exit status from /var/tmp/rpm-tmp.hWB5yf (%check)

Is here anything wrong with my configuration or I need to modify the code?

BasioMeusPuga commented 6 years ago

This very likely isn't anything at your end. It's to do with the KindleUnpack code that I'm including in the project. Give me a little time. I'll try to fix this myself, or I'll file an issue with the maintainer and see what they say.

Of course, if you feel like taking a stab at the thing, all help is welcome.

guoyunhe commented 6 years ago

I found that it is caused by RPM %check macro which run python setup.py test or something related to test. But it not necessary for packaging a desktop application. So I just disabled this line and now I can install and package it.

Thanks for the reply!

bugzy commented 6 years ago

@guoyunhe just in case you are still working on rpm spec files, there is a functional one for fedora at https://copr-be.cloud.fedoraproject.org/results/bugzy/delayed/fedora-27-x86_64/00743845-lector/lector.spec

guoyunhe commented 6 years ago

@bugzy Thanks! The package has been created. I am waiting openSUSE team to approve it. (I guess most of them are busy preparing openSUSE Leap 15 release...)

https://build.opensuse.org/request/show/595602

guoyunhe commented 6 years ago

Solved my problem. Thanks for helping!