Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2014, 07:31 PM   #1
t3d
Enthusiast
t3d began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Nov 2009
Location: Poland
Device: kindle 1st gen, kindle dxg, kindle paperwhite2
calibre develop on gentoo

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...
t3d is offline   Reply With Quote
Old 11-23-2014, 08:57 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You dont need to install anything. Just install the official calibre binary from http://calibre-ebook.com/download_linux, that will acts as its own complete runtime.

See the instructions here: http://manual.calibre-ebook.com/develop.html
kovidgoyal is offline   Reply With Quote
Advert
Old 11-23-2014, 08:57 PM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You can just use the binaries from the main website, and use the CALIBRE_DEVELOP_FROM variable to run the source code from your GitHub clone.

Much easier than messing around with setting up the compilation yourself.

Also, see Fully automatic calibre installer/updater for linux to keep the binaries updated (necessary when C++ extensions are updated).
eschwartz is offline   Reply With Quote
Old 11-24-2014, 02:34 PM   #4
t3d
Enthusiast
t3d began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Nov 2009
Location: Poland
Device: kindle 1st gen, kindle dxg, kindle paperwhite2
Thanks, using the CALIBRE_DEVELOP_FROM should be sufficient.
t3d is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Helping to Develop Calibre Core Software Borodin Development 6 09-10-2014 11:23 PM
Gentoo problem with error :No device connected joebie13 Devices 1 12-09-2011 09:04 AM
What happened to calibre-debug "--develop-from" option? macr0t0r Calibre 6 12-03-2009 07:22 PM
Gentoo Weekly News, Handbooks in Plucker format hacker Workshop 5 08-28-2007 09:39 AM
Gentoo Handbook (and news feed) in Plucker format hacker Workshop 3 04-28-2005 06:22 AM


All times are GMT -4. The time now is 04:54 AM.


MobileRead.com is a privately owned, operated and funded community.