Hi Kovid,
I've decided to do my development on gentoo, but it turns out that preparing the environment is not a trivial task...
I'm using code cloned from github and trying to get calibre development installed. The OS is 64bit, lxde with no kde or anything like that.
At first I got
Code:
[tomek ~/calibre]$ sudo python2.7 setup.py develop
Traceback (most recent call last):
File "setup.py", line 13, in <module>
import setup.commands as commands
File "/home/tomek/calibre/setup/commands.py", line 28, in <module>
from setup.translations import POT, GetTranslations, Translations, ISO639, ISO3166
File "/home/tomek/calibre/setup/translations.py", line 14, in <module>
from setup.parallel_build import parallel_check_output
File "/home/tomek/calibre/setup/parallel_build.py", line 13, in <module>
from setup.build_environment import cpu_count
File "/home/tomek/calibre/setup/build_environment.py", line 84, in <module>
qraw = subprocess.check_output([QMAKE, '-query']).decode('utf-8')
File "/usr/lib64/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib64/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
So i figured out, that I need to have a qmake installed.
Got qt overlay installed to get qt5 (emerge @qt5-essentials). So now I have a qmake:
Code:
[tomek ~/calibre]$ which qmake
/usr/bin/qmake
[tomek ~/calibre]$ equery b /usr/bin/qmake
* Searching for /usr/bin/qmake ...
dev-qt/qtchooser-0_p20140613 (/usr/bin/qmake -> qtchooser)
dev-qt/qtchooser-0_p20140613 (/usr/bin/qtchooser)
[tomek ~/calibre]$ sudo python2.7 setup.py develop
Password:
qmake: could not find a Qt installation of ''
Traceback (most recent call last):
File "setup.py", line 13, in <module>
import setup.commands as commands
File "/home/tomek/calibre/setup/commands.py", line 28, in <module>
from setup.translations import POT, GetTranslations, Translations, ISO639, ISO3166
File "/home/tomek/calibre/setup/translations.py", line 14, in <module>
from setup.parallel_build import parallel_check_output
File "/home/tomek/calibre/setup/parallel_build.py", line 13, in <module>
from setup.build_environment import cpu_count
File "/home/tomek/calibre/setup/build_environment.py", line 84, in <module>
qraw = subprocess.check_output([QMAKE, '-query']).decode('utf-8')
File "/usr/lib64/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/qmake', '-query']' returned non-zero exit status 1
[tomek ~/calibre]$ qmake -query
qmake: could not find a Qt installation of ''
[tomek ~/calibre]$ echo $?
1
Hm, that's obviously not the one we need...
but there is another one, buried somewhere outside of $PATH:
Code:
/usr/lib64/qt5/bin/qmake
So I take this guy and pass it to python:
Code:
[tomek ~/calibre]$ sudo PATH=/usr/lib64/qt5/bin/:$PATH python2.7 setup.py develop
Traceback (most recent call last):
File "setup.py", line 13, in <module>
import setup.commands as commands
File "/home/tomek/calibre/setup/commands.py", line 28, in <module>
from setup.translations import POT, GetTranslations, Translations, ISO639, ISO3166
File "/home/tomek/calibre/setup/translations.py", line 14, in <module>
from setup.parallel_build import parallel_check_output
File "/home/tomek/calibre/setup/parallel_build.py", line 13, in <module>
from setup.build_environment import cpu_count
File "/home/tomek/calibre/setup/build_environment.py", line 96, in <module>
from PyQt5.QtCore import PYQT_CONFIGURATION
ImportError: No module named PyQt5.QtCore
Isn't it the qtcore I have installed?
Code:
mutex calibre # emerge -av qtcore
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] dev-qt/qtcore-5.4.0_beta:5::qt USE="-debug -icu {-test}" 0 KiB
What should I have installed? I assume you also do your development on gentoo. Maybe you could post the list of ebuilds installed from qt overlay?
And I know that there is no need to install the development version, but the ebuild on gentoo is for calibre-1.48...