Giter VIP home page Giter VIP logo

build-calibre's Introduction

Hi there πŸ‘‹

Kovid's GitHub stats

Top Langs

GitHub Streak

The best way to contact me is to use my email address which is present at the top of most calibre or kitty source code files.

build-calibre's People

Contributors

gberes01 avatar kovidgoyal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

build-calibre's Issues

How do I install calibre-ebook on Linux

How do I install calibre-ebook on Linux
an error

Using python executable: /usr/bin/python2
2019-06-24 16:27:44 URL:https://download.calibre-ebook.com/linux-installer.sh [31301/31301] -> "-" [1]
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 771
    type_map = {x: path for x in 'install_dir isolated bin_dir share_dir ignore_umask'.split()}
                          ^
SyntaxError: invalid syntax

Crosscompile guide

Hello,

Can you also provide a crosscompile guide?
I am trying to use that on a device with arm cpu (not rasperry pi).

Thank you!

Also need WiX-3.10

Hi, Kovid!
In the end of build calibre also need WiX-3.10. Add this dependency in Readme.md.
'C:\Program Files (x86)\WiX Toolset v3.10\bin\candle.exe' -nologo -arch x64 -ext WiXUtilExtension -o 'C:\t\t\frozen-5j14ew\wix\calibre.wixobj' 'C:\t\t\frozen-5j14ew\wix\calibre.wxs'
Could not find the program: C:\Program Files (x86)\WiX Toolset v3.10\bin\candle.exe

Need patch in cygwin packages etc

Hi, Kovid!

  1. Please, add patch to list of cygwin packages.
  2. Also, I think I need to fix absolute path of WiX packages in wix.py because this path include version. Add WiX to PATH environment variable.
  3. During build I get some errors:
    Python function terminated unexpectedly
  [Errno 2] No such file or directory: u'C:\\t\\t\\frozen-hajxe4\\winfrozen\\app
\\resources\\localization\\iso639.calibre_msgpack' (Error Code: 1)
Traceback (most recent call last):
  File "site.py", line 101, in main
  File "site.py", line 78, in run_entry_point
  File "site-packages\calibre\debug.py", line 304, in main
  File "site-packages\calibre\test_build.py", line 316, in test
  File "site-packages\calibre\test_build.py", line 309, in find_tests
  File "site-packages\calibre\spell\dictionary.py", line 90, in <module>
  File "site-packages\calibre\spell\__init__.py", line 30, in parse_lang_code
  File "site-packages\calibre\utils\localization.py", line 408, in canonicalize_
lang
  File "site-packages\calibre\utils\localization.py", line 356, in _load_iso639
  File "site-packages\calibre\utils\resources.py", line 76, in get_path
IOError: [Errno 2] No such file or directory: u'C:\\t\\t\\frozen-hajxe4\\winfroz
en\\app\\resources\\localization\\iso639.calibre_msgpack'

and

======================================================================
ERROR: test_lzma (calibre.test_build.BuildTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "site-packages\calibre\test_build.py", line 66, in test_lzma
  File "site-packages\lzma\xz.py", line 480, in test_lzma2
  File "site-packages\calibre\utils\resources.py", line 76, in get_path
IOError: [Errno 2] No such file or directory: u'C:\\t\\t\\frozen-mpbikx\\winfroz
en\\app\\resources\\template-functions.json'

After adding localization directory and template-functions.json file to C:\calibre\resources I get error:

======================================================================
FAIL: test_dlls (calibre.test_build.BuildTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "site-packages\calibre\test_build.py", line 33, in test_dlls
AssertionError: Failed to load DLL api-ms-win-core-console-l1-1-0.dll with error
: [Error 193] %1 is not a valid Win32 application

----------------------------------------------------------------------

I could not fix only the last error. I did quick fix C:\calibre\src\calibre\test_build.py :)

def test_dlls(self):
        import win32api
        base = win32api.GetDllDirectory()
        for x in os.listdir(base):
            if x.lower().endswith('.dll'):
                try:
                    ctypes.WinDLL(str(os.path.join(base, x)))
                except Exception as err:
				    continue

Question. Kovid, why I get different msi packages (different sizes) after building? After installation fresh msi package, I get error

Python function terminated unexpectedly
No module named filename_pattern_ui (Error Code: 1)

How to fix this?
Thanks!
PS: I build 64 bit calibre

Build hangs at downloading libgcrypt for infinite time

gabi@gabi-XPS-13-9350 ~/Downloads/build-calibre $ ./linux 64
sudo mkdir -p /home/gabi/Downloads/build-calibre/build/linux/64/container-1/usr/share/terminfo/x
sudo cp -a /lib/terminfo/x/xterm-256color /home/gabi/Downloads/build-calibre/build/linux/64/container-1/usr/share/terminfo/x
sudo chroot --userspec=1000:1000 /home/gabi/Downloads/build-calibre/build/linux/64/container-1 python2 /scripts/main.py

Downloading libgcrypt-1.7.1.tar.bz2 from ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.7.1.tar.bz2

Compile error when compiling ISO639 files

Hi,

I managed to install most dependencies, and ran into an error that I cannot understand:

Compiling ISO639 files...
Traceback (most recent call last):
File "setup.py", line 121, in
sys.exit(main())
File "setup.py", line 106, in main
command.run_all(opts)
File "/root/calibre/setup/init.py", line 242, in run_all
self.run_cmd(self, opts)
File "/root/calibre/setup/init.py", line 234, in run_cmd
self.run_cmd(scmd, opts)
File "/root/calibre/setup/init.py", line 238, in run_cmd
cmd.run(opts)
File "/root/calibre/setup/translations.py", line 276, in run
self.compile_main_translations()
File "/root/calibre/setup/translations.py", line 369, in compile_main_translations
self.compile_group(files, file_ok=self.check_iso639)
File "/root/calibre/setup/translations.py", line 307, in compile_group
if file_ok is None or file_ok(data, src):
File "/root/calibre/setup/translations.py", line 439, in check_iso639
cm = langnames_to_langcodes([omsgid, msgid])
File "/root/calibre/src/calibre/utils/localization.py", line 448, in langnames_to_langcodes
iso639 = _load_iso639()
File "/root/calibre/src/calibre/utils/localization.py", line 354, in _load_iso639
_iso639 = msgpack_loads(ip)
File "/root/calibre/src/calibre/utils/serialize.py", line 109, in msgpack_loads
return msgpack.unpackb(dump, ext_hook=msgpack_decoder, raw=False)
File "msgpack/_unpacker.pyx", line 211, in msgpack._unpacker.unpackb
msgpack.exceptions.UnpackValueError: Unpack failed: error = 0

Can you shed some light on what is the root cause of this compile error?

Thank!

Error in script .\main 64 calibre

Hi!
I run script on build machine after success ending of building dependencies and I get error.

C:\scripts>python .\main.py 64 calibre
Installing 46 previously compiled packages: easylzma, zlib, unrar, expat, sqlite
, openssl, python, pywin32, icu, libjpeg, libpng, libwebp, jxrlib, freetype, lib
xml2, libxslt, chmlib, optipng, mozjpeg, poppler, podofo, qt, webkit, sip, pyqt,
 setuptools, six, css-parser, dateutil, dnspython, mechanize, msgpack, regex, ch
ardet, dukpy, unrardll, pygments, pycrypto, apsw, lxml, html5-parser, pillow, ne
tifaces, psutil, webencodings, html5lib,
'C:\sw64\sw\private\python\python.exe' setup.py build '--build-dir=C:\t\t\build-
tqxklb' '--output-dir=C:\t\t\plugins-6lkyhw'

*
* Running build
*


####### Building extension hunspell #######
Compiling hunspell
Traceback (most recent call last):
  File "setup.py", line 121, in <module>
    sys.exit(main())
  File "setup.py", line 106, in main
    command.run_all(opts)
  File "C:\calibre\setup\__init__.py", line 242, in run_all
    self.run_cmd(self, opts)
  File "C:\calibre\setup\__init__.py", line 238, in run_cmd
    cmd.run(opts)
  File "C:\calibre\setup\build.py", line 278, in run
    self.build(ext, dest)
  File "C:\calibre\setup\build.py", line 322, in build
    if not parallel_build(jobs, self.info):
  File "C:\calibre\setup\parallel_build.py", line 74, in parallel_build
    for ok, stdout, stderr in p.imap(run_worker, jobs):
  File "C:\sw64\sw\private\python\lib\multiprocessing\pool.py", line 673, in nex
t
    raise value
UnicodeDecodeError: 'utf8' codec can't decode byte 0xaf in position 76: invalid
start byte
The following command failed, with return code: 1
'C:\sw64\sw\private\python\python.exe' setup.py build '--build-dir=C:\t\t\build-
tqxklb' '--output-dir=C:\t\t\plugins-6lkyhw'
Dropping you into a shell

Problem while downloading unrardll

abi@gabi-XPS-13-9350:~/Downloads/build-calibre$ ./linux 64
sudo mkdir -p /home/gabi/Downloads/build-calibre/build/linux/64/container-1/usr/share/terminfo/x
sudo cp -a /lib/terminfo/x/xterm-256color /home/gabi/Downloads/build-calibre/build/linux/64/container-1/usr/share/terminfo/x
sudo chroot --userspec=1000:1000 /home/gabi/Downloads/build-calibre/build/linux/64/container-1 python2 /scripts/main.py

Downloading unrardll-0.1.3.tar.gz from None
Traceback (most recent call last):
File "/scripts/pkgs/download_sources.py", line 158, in download_pkg
return try_once(pkg, url)
File "/scripts/pkgs/download_sources.py", line 149, in try_once
urllib.urlretrieve(url, fname, reporthook)
File "/usr/lib/python2.7/urllib.py", line 93, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "/usr/lib/python2.7/urllib.py", line 227, in retrieve
url = unwrap(toBytes(url))
File "/usr/lib/python2.7/urllib.py", line 1056, in unwrap
url = url.strip()
AttributeError: 'NoneType' object has no attribute 'strip'
Download failed, with error: 'NoneType' object has no attribute 'strip'

Downloading unrardll-0.1.3.tar.gz from None
Traceback (most recent call last):
File "/scripts/pkgs/download_sources.py", line 158, in download_pkg
return try_once(pkg, url)
File "/scripts/pkgs/download_sources.py", line 149, in try_once
urllib.urlretrieve(url, fname, reporthook)
File "/usr/lib/python2.7/urllib.py", line 93, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "/usr/lib/python2.7/urllib.py", line 227, in retrieve
url = unwrap(toBytes(url))
File "/usr/lib/python2.7/urllib.py", line 1056, in unwrap
url = url.strip()
AttributeError: 'NoneType' object has no attribute 'strip'
Download failed, with error: 'NoneType' object has no attribute 'strip'

Downloading unrardll-0.1.3.tar.gz from None
Traceback (most recent call last):
File "/scripts/pkgs/download_sources.py", line 158, in download_pkg
return try_once(pkg, url)
File "/scripts/pkgs/download_sources.py", line 149, in try_once
urllib.urlretrieve(url, fname, reporthook)
File "/usr/lib/python2.7/urllib.py", line 93, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "/usr/lib/python2.7/urllib.py", line 227, in retrieve
url = unwrap(toBytes(url))
File "/usr/lib/python2.7/urllib.py", line 1056, in unwrap
url = url.strip()
AttributeError: 'NoneType' object has no attribute 'strip'
Download failed, with error: 'NoneType' object has no attribute 'strip'

Downloading of unrardll failed after three tries, giving up.

R.I.P. for www.bzip.org

Apparently the domain bzip.org is not valid anymore.
I had to hand download from https://web.archive.org/web/20180624184835/http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz.
Of course countless other alternatives are available, but current sources.json fails miserably.

Failed to import site module::No module named site

Hello,

I managed to built the binaries successfully for armhf.
The command CALIBRE_SRC_DIR=... ./linux 32 calibre created the binary packages (calibre-3.37.0-i686.txz). I extracted the archive to /opt/calibre, and ebook-convert (or similarly other binaries) return the error "Failed to import site module::No module named site".

Can you shed some light on what might have gone wrong?
Thanks!

hello

hello, how can I use mixed page orientations in the same epub file in calibre?
and please how can I make footnotes to be superscripts in calibre?

acbuild -> docker migration

Acbuild is not maintained anymore and it is not available in mainstream distributions. You need to install from source. How about using Docker instead?

AttributeError: 'module' object has no attribute 'touch'

Setting up libx11-xcb-dev (2:1.4.99.1-0ubuntu2.3) ...
Setting up libxcb-glx0-dev (1.8.1-1ubuntu0.2) ...
Setting up ruby1.8 (1.8.7.352-2ubuntu1.6) ...
update-alternatives: using /usr/bin/ruby1.8 to provide /usr/bin/ruby (ruby) in auto mode.
Setting up ruby (4.8) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
sudo acbuild run -- apt-get clean
sudo acbuild run -- useradd --home-dir=/home/gabi --create-home --uid=1000 --gid=100 gabi
sudo acbuild run -- chsh -s /bin/zsh gabi
sudo mv .acbuild/currentaci/rootfs /home/gabi/Downloads/build-calibre/build/linux/64/container-1
sudo chown 1000:1000 /home/gabi/Downloads/build-calibre/build/linux/64/container-1
sudo acbuild end
Traceback (most recent call last):
File "./linux", line 254, in
run()
File "./linux", line 234, in run
os.touch(os.path.join(tdir, '.zshrc'))
AttributeError: 'module' object has no attribute 'touch'

OSError: [Errno 2] No such file or directory

Hi, kovidgoyal
I'm trying to build calibre myself but I'm stuck in the first step ( python setup.py bootstrap)
I got the following error:
`Already up to date.

  • Running build

Traceback (most recent call last):
File "setup.py", line 121, in
sys.exit(main())
File "setup.py", line 106, in main
command.run_all(opts)
File "/root/calibre-3.32.0/setup/init.py", line 198, in run_all
self.run_cmd(self, opts)
File "/root/calibre-3.32.0/setup/init.py", line 190, in run_cmd
self.run_cmd(scmd, opts)
File "/root/calibre-3.32.0/setup/init.py", line 194, in run_cmd
cmd.run(opts)
File "/root/calibre-3.32.0/setup/build.py", line 255, in run
self.env = init_env()
File "/root/calibre-3.32.0/setup/build.py", line 150, in init_env
from setup.build_environment import msvc, is64bit, win_inc, win_lib, NMAKE
File "/root/calibre-3.32.0/setup/build_environment.py", line 77, in
qraw = subprocess.check_output([QMAKE, '-query']).decode('utf-8')
File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
`
I'm using debian 8 to do the builds. What does this OSErros mean?
Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.