Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 799365 - app-text/calibre-5.16.1: Unable to import 'pyqtbuild': No module named 'pyqtbuild'
Summary: app-text/calibre-5.16.1: Unable to import 'pyqtbuild': No module named 'pyqtb...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 3 votes (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on: 805965
Blocks:
  Show dependency tree
 
Reported: 2021-06-30 16:25 UTC by lekto
Modified: 2021-09-21 03:17 UTC (History)
24 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,6.37 KB, application/x-info)
2021-06-30 16:25 UTC, lekto
Details
build.log without PyQt-builder (build.log,45.05 KB, text/plain)
2021-06-30 16:26 UTC, lekto
Details
build.log with PyQt-builder (build.log,45.20 KB, text/plain)
2021-06-30 16:26 UTC, lekto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lekto 2021-06-30 16:25:30 UTC
Created attachment 720372 [details]
emerge --info

Hi, I tried to install app-text/calibre and during building I got this error:
>Unable to import 'pyqtbuild': No module named 'pyqtbuild'
After I installed dev-python/PyQt-builder-1.10.1-r1 I got this error:
>Unable to find file "QtWidgets/QtWidgetsmod.sip"
But I have this file:
>/usr/share/sip/PyQt5/QtWidgets/QtWidgetsmod.sip
I think there are some dependencies missing somewhere.
Comment 1 lekto 2021-06-30 16:26:00 UTC
Created attachment 720375 [details]
build.log without PyQt-builder
Comment 2 lekto 2021-06-30 16:26:59 UTC
Created attachment 720378 [details]
build.log with PyQt-builder
Comment 3 Jean-Claude Aciman 2021-08-03 16:54:05 UTC
I do have exactly the same issue.
The file QtWidgetsmod.sip is present in th folder /usr/share/sip/PyQt5/QtWidgets/ and the error is reported in the build of calibre.
Comment 4 Bogdan 2021-08-10 21:10:56 UTC
I do have exactly the same issue.
The file QtWidgetsmod.sip is present in th folder /usr/share/sip/PyQt5/QtWidgets/ and the error is reported in the build of calibre.
Comment 5 Sven Hesse 2021-08-17 12:56:41 UTC
I have the same problems. Moreover, the previously build calibre doesn't run anymore, because of bug #800233. Looking into the build logs there of people being able to rebuild calibre, I noticed that a certain SIP patch is pulled in for them that is not for me.

Looking at the ebuild, I saw that the patch is only applied when >=dev-python/sip-5 is not installed (calibre-5.16.1.ebuild:128). Well, I do have dev-python/sip:5 installed, so the patch is not applied and building fails.

When I manually pull in the patch into /etc/portage/patches/ (and also pull in the zeroconf patch from #800233), calibre builds and runs for me again.

I have no idea what that means, what SIP even is, etc. But it might provide a lead for someone who does have a clue.
Comment 6 Jouni Kosonen 2021-09-01 04:38:33 UTC
(In reply to Sven Hesse from comment #5)
> (calibre-5.16.1.ebuild:128)
> 
> When I manually pull in the patch into /etc/portage/patches/ (and also pull
> in the zeroconf patch from #800233), calibre builds and runs for me again.

Thanks for that, Sven! I too needed to use calibre-5.16.0-SIP-v4.patch for the build to find QtWidgetsmod.sip with app-text/calibre-5.16.1-r1 – zeroconf at least is already handled there.

This was with dev-python/PyQt5-sip-12.9.0, dev-python/sip-4.19.25-r1:0 and dev-python/sip-5.5.0-r2:5 installed. 

/usr/share/sip/PyQt5/QtWidgets/QtWidgetsmod.sip itself comes from 
dev-python/PyQt5-5.15.4-r1.
Comment 7 Andrew Udvare 2021-09-06 17:10:35 UTC
What is the exact fix? Could you post instructions?
Comment 8 Sven Hesse 2021-09-06 17:19:40 UTC
mkdir /etc/portage/patches/app-text/calibre-5.16.1/
cp /usr/portage/distfiles/calibre-5.16.0-SIP-v4.patch.xz /etc/portage/patches/app-text/calibre-5.16.1/
xz -d /etc/portage/patches/app-text/calibre-5.16.1/calibre-5.16.0-SIP-v4.patch.xz

And then emerging calibre works.
Comment 9 PhobosK 2021-09-06 19:02:40 UTC
The problem seems to be when one has the two slots of dev-python/sip (0 and 5) installed....

A workaround for app-text/calibre-5.16.1-r1 is to remove all dev-python/sip then emerge app-text/calibre-5.16.1-r1 (it will pull dev-python/sip:0) and finally to reinstall dev-python/sip:5...
I.e. :

1. emerge -C dev-python/sip
2. emerge -av =app-text/calibre-5.16.1-r1
3. emerge -av dev-python/sip:5

That fixed the problem for me.
Comment 10 Andrew Udvare 2021-09-07 18:38:55 UTC
(In reply to PhobosK from comment #9)
> The problem seems to be when one has the two slots of dev-python/sip (0 and
> 5) installed....
> 
> A workaround for app-text/calibre-5.16.1-r1 is to remove all dev-python/sip
> then emerge app-text/calibre-5.16.1-r1 (it will pull dev-python/sip:0) and
> finally to reinstall dev-python/sip:5...
> I.e. :
> 
> 1. emerge -C dev-python/sip
> 2. emerge -av =app-text/calibre-5.16.1-r1
> 3. emerge -av dev-python/sip:5
> 
> That fixed the problem for me.

This worked for me too. I don't know how Portage would enforce this in an automated way.