Quote:
Originally Posted by beedaddy
Stupid question: And the betas are Python 3? I downloaded calibre-3.40.1-x86_64.txz from the beta directory, and "debug device detection" tells me
|
The code has seen a lot of work to improve python 3 compatibility:
- several bits of vendored code have been devendored, so calibre now uses an external feedparser, markdown, html2text, and beautifulsoup4 -- this means calibre is ported from the old beautifulsoup3 to the new beautifulsoup4, which should be nice too.
- all the C extensions now compile cleanly on python3 (and seem to work)
- a "polyglot" module has been written to provide various bits of functionality that are changed on python2/python3, and is now being extensively used
- all code is able to import properly
- It's now possible to fully bootstrap, build, and even install, and is sufficient to *try* starting it...
- you can actually run the testsuite without it erroring out during the "search for tests" stage
... but there is still a ton more work to do. At the moment, the GUI doesn't start at all and there are over a hundred failures in the testsuite alone... but it's a start, and it means we can now easily test calibre.
If anyone has the spare time and knowledge, please feel free to help with the port.
In order to experiment with python3, you will need to compile it from source. You will need to be running linux, and you will need to install all the usual build-from-source dependencies, as listed here:
https://github.com/kovidgoyal/build-...s/sources.json
Except for each PyPI dependency, you will want to install using python3 instead of python2.
Then, simply run the bootstrap process listed at
https://github.com/kovidgoyal/calibr...TALL.rst#build
Except instead of using python2, use python3, and furthermore, you must set the environment variable CALIBRE_PY3_PORT.
So,
Code:
CALIBRE_PY3_PORT=1 python3 setup.py bootstrap
Then you can hack the code, try to run setup.py test, etc.
For Arch Linux users, the "calibre-git" package in the AUR has a good description of the build process, and a list of dependencies -- simply swap out "python-" for each "python2-*" dependency.