Quote:
Originally Posted by kovidgoyal
You are welcome to add USER_BASE to site.py.
|
If I could get calibre going from source, I'd give it a shot.
Quote:
Originally Posted by kovidgoyal
Its not out of date as far as I know and if you want help with something failing, post the error message and ask for help.
|
On a clean Ubuntu 20.04 install (it's the same on 18.04, 16.04 is too old and it explodes for different reasons):
Code:
durr@ubuntu ~> mkdir tmp
durr@ubuntu ~> cd tmp
durr@ubuntu ~/tmp> git clone https://github.com/kovidgoyal/bypy.git
Cloning into 'bypy'...
remote: Enumerating objects: 1831, done.
remote: Counting objects: 100% (268/268), done.
remote: Compressing objects: 100% (178/178), done.
remote: Total 1831 (delta 180), reused 169 (delta 90), pack-reused 1563
Receiving objects: 100% (1831/1831), 559.23 KiB | 2.55 MiB/s, done.
Resolving deltas: 100% (1184/1184), done.
durr@ubuntu ~/tmp> git clone https://github.com/kovidgoyal/calibre.git
Cloning into 'calibre'...
remote: Enumerating objects: 356412, done.
remote: Counting objects: 100% (3306/3306), done.
remote: Compressing objects: 100% (1765/1765), done.
remote: Total 356412 (delta 1918), reused 2273 (delta 1540), pack-reused 353106
Receiving objects: 100% (356412/356412), 270.89 MiB | 16.14 MiB/s, done.
Resolving deltas: 100% (286504/286504), done.
durr@ubuntu ~/tmp> cd calibre
durr@ubuntu ~/t/calibre (master)> ./setup.py bootstrap
/usr/bin/env: ‘python’: No such file or directory
durr@ubuntu ~/t/calibre (master) [127]>
Ok, so the shebang line is outdated:
Code:
durr@ubuntu ~/t/calibre (master) [127]> python3 setup.py bootstrap
Cloning into 'translations'...
remote: Enumerating objects: 173431, done.
remote: Counting objects: 100% (5704/5704), done.
remote: Compressing objects: 100% (1493/1493), done.
remote: Total 173431 (delta 5316), reused 4447 (delta 4211), pack-reused 167727
Receiving objects: 100% (173431/173431), 835.29 MiB | 18.02 MiB/s, done.
Resolving deltas: 100% (169792/169792), done.
Updating files: 100% (4098/4098), done.
*
* 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/durr/tmp/calibre/setup/__init__.py", line 233, in run_all
self.run_cmd(self, opts)
File "/home/durr/tmp/calibre/setup/__init__.py", line 223, in run_cmd
self.run_cmd(scmd, opts)
File "/home/durr/tmp/calibre/setup/__init__.py", line 227, in run_cmd
cmd.run(opts)
File "/home/durr/tmp/calibre/setup/build.py", line 296, in run
self.env = init_env(debug=opts.debug)
File "/home/durr/tmp/calibre/setup/build.py", line 171, in init_env
from setup.build_environment import win_ld, is64bit, win_inc, win_lib, NMAKE, win_cc
File "/home/durr/tmp/calibre/setup/build_environment.py", line 108, in <module>
qraw = subprocess.check_output([QMAKE, '-query']).decode('utf-8')
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'qmake'
From the documentation in that directory, I'm assuming that you need to run the bootstrap step first? I've had some luck with the `build_dep` commands, but again, what each of the setup.py commands does is lightly/undocumented documented.
In any event, following the exact steps as documented don't work. It's either out of date, or was never correct in the first place.
It's possible you
don't need to run the "bootstrap" step first, but in that case, I don't know what bootstrap is supposed to mean, it generally indicates it's the first thing that needs to be done.