Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-20-2015, 03:36 AM   #1
faredoon
Member
faredoon began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2013
Device: Kindle 4
Building from source - PyQt5 with Python 2.7

Hi all,

I'm trying to get all dependencies installed and build the source. I believe Calibre sources are built against Qt5(?) and Python 2.7. From general searching, PyQt5 has no official release for Python 2.7.

Do we need a custom build of Qt5 for Python 2.7 to get the source to build?
faredoon is offline   Reply With Quote
Old 09-20-2015, 03:37 AM   #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,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...dows/notes.rst
kovidgoyal is offline   Reply With Quote
Advert
Old 09-20-2015, 03:43 AM   #3
faredoon
Member
faredoon began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2013
Device: Kindle 4
Wow, thanks Kovid. I was a bit lost searching on the Calibre website. Will try this.

Quote:
Originally Posted by kovidgoyal View Post
faredoon is offline   Reply With Quote
Old 02-05-2018, 04:13 PM   #4
tsar2512
Junior Member
tsar2512 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2018
Device: ipad
I seem to have a similar problem, but those notes no longer exist. Can you please point me to the fix, I am try to build calibre from source in linux.

Error as follows:

python setup.py bootstrap
Already up-to-date.

*
* Running build
*

Traceback (most recent call last):
File "setup.py", line 119, in <module>
sys.exit(main())
File "setup.py", line 104, in main
command.run_all(opts)
File "/home/nipun/workspace/tmp/githubCalibre/calibre/setup/__init__.py", line 236, in run_all
self.run_cmd(self, opts)
File "/home/nipun/workspace/tmp/githubCalibre/calibre/setup/__init__.py", line 228, in run_cmd
self.run_cmd(scmd, opts)
File "/home/nipun/workspace/tmp/githubCalibre/calibre/setup/__init__.py", line 232, in run_cmd
cmd.run(opts)
File "/home/nipun/workspace/tmp/githubCalibre/calibre/setup/build.py", line 247, in run
self.env = init_env()
File "/home/nipun/workspace/tmp/githubCalibre/calibre/setup/build.py", line 142, in init_env
from setup.build_environment import msvc, is64bit, win_inc, win_lib, NMAKE
File "/home/nipun/workspace/tmp/githubCalibre/calibre/setup/build_environment.py", line 98, in <module>
pyqt['pyqt_sip_dir'] = get_sip_dir()
File "/home/nipun/workspace/tmp/githubCalibre/calibre/setup/build_environment.py", line 97, in get_sip_dir
raise EnvironmentError('Failed to find the location of the PyQt5 .sip files')
EnvironmentError: Failed to find the location of the PyQt5 .sip files
tsar2512 is offline   Reply With Quote
Old 02-05-2018, 09:52 PM   #5
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,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/build-calibre
kovidgoyal is offline   Reply With Quote
Advert
Old 02-06-2018, 09:55 AM   #6
tsar2512
Junior Member
tsar2512 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2018
Device: ipad
Thanks Kovid this is very useful, however the first line asks to do the same step:

`First you need a bootstrapped copy of the calibre source code. This means either untar the official calibre source distribution tarball, or checkout calibre from github and run python setup.py bootstrap.`

This is what I tried and had a failure with qt5 in the last post. Am I missing something?
tsar2512 is offline   Reply With Quote
Old 02-06-2018, 11:06 AM   #7
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,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Follow the instruction in the readme in that repository, it will let you build calibre and all its dependencies in a chroot, which will avoid all the issues with broken system software.
kovidgoyal is offline   Reply With Quote
Old 02-06-2018, 03:22 PM   #8
tsar2512
Junior Member
tsar2512 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2018
Device: ipad
I looked into the readme. I am assuming what you mean is that the python setup.py bootstrap needs to be done in a container. Specifically,

'You need to have acbuild installed as the linux builds are done in a container created using acbuild'

From the website details it seems like 'acbuild' is no longer supported. Is there any reason why calibre can only be built on acbuild?

Why can we not build it in a normal linux environment. Or a linux container if that works?

In any case for my use-case I cannot use Calibre's binary distribution as is, and need to build it with our own build system.
tsar2512 is offline   Reply With Quote
Old 02-06-2018, 08:01 PM   #9
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,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you want to build it on your own system, you will need to understand how all its dependencies work, and make sure they are installed corerectly. That is not something easy to do. And I'm afraid I dont have the time to guide you through it.
kovidgoyal is offline   Reply With Quote
Reply

Tags
source build qt

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Building Calibre from source for Raspberry Pi wayt Calibre 12 08-08-2014 12:53 PM
Touch Python script for building shelf automatically deufeufeu Kobo Developer's Corner 7 01-27-2014 09:59 AM
building 0.9.33 from source on openSUSE 12.2 - Error mhomann Development 2 06-02-2013 06:13 AM
building from source - qt4.8.1? platt Sigil 10 05-21-2012 09:32 AM
Building Calibre from source al35 Calibre 3 03-24-2010 02:22 PM


All times are GMT -4. The time now is 10:05 PM.


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