View Single Post
Old 07-04-2017, 07:45 AM   #34
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,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by kovidgoyal View Post
@Eli: I'm not going to add a dependency on sphinx to the calibre build process. I will create a separate command to build the man pages conveniently, but that's about it.
Seems reasonable. But if it subprocesses calibre-debug it still requires a separate calibre installation before it can run, and I think I do want to put a python2-sphinx makedepends in my AUR package (which needs to bootstrap everything). Arch usually adds in extra makedepends when it is needed for docs.

We can copy it across ourselves.

Also, I tried building it, and I don't think it likes working in parallel.
(Was this supposed to cache the doctrees so they aren't repeatedly generated?)

Code:
*
* Running man_pages
*

	Creating man pages in /home/eschwartz/git/calibre/man-pages...


**************** Building translations for: en
[Errno 2] No such file or directory
[eschwartz@vostro ~/git/calibre]$ python2 setup.py man_pages

*
* Running man_pages
*

	Creating man pages in /home/eschwartz/git/calibre/man-pages...


**************** Building translations for: en

Exception occurred:
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/home/eschwartz/git/calibre/man-pages/doctrees'
The full traceback has been saved in /tmp/sphinx-err-McF2d_.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
sphinx-build2 -D language=en -b man -q -d /home/eschwartz/git/calibre/man-pages/doctrees /home/eschwartz/git/calibre/manual /home/eschwartz/git/calibre/man-pages/en
Traceback (most recent call last):
  File "/usr/bin/calibre-debug", line 20, in <module>
    sys.exit(main())
  File "/home/eschwartz/git/calibre/src/calibre/debug.py", line 320, in main
    run_script(args[1], args[2:])
  File "/home/eschwartz/git/calibre/src/calibre/debug.py", line 238, in run_script
    execfile(ef, g)
  File "/home/eschwartz/git/calibre/manual/build.py", line 108, in <module>
    build_man_pages(language, base)
  File "/home/eschwartz/git/calibre/manual/build.py", line 81, in build_man_pages
    sphinx_build(language, base, builder='man', bdir=language)
  File "/home/eschwartz/git/calibre/manual/build.py", line 36, in sphinx_build
    subprocess.check_call(ans)
  File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '[u'sphinx-build2', u'-D', u'language=en', u'-b', u'man', u'-q', u'-d', u'/home/eschwartz/git/calibre/man-pages/doctrees', u'/home/eschwartz/git/calibre/manual', u'/home/eschwartz/git/calibre/man-pages/en']' returned non-zero exit status 1
Code:
# Sphinx version: 1.6.3
# Python version: 2.7.13 (CPython)
# Docutils version: 0.13.1 release
# Jinja2 version: 2.9.6
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sphinx/cmdline.py", line 305, in main
    opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)
  File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 226, in __init__
    self.builder = self.create_builder(buildername)
  File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 306, in create_builder
    return self.registry.create_builder(self, name)
  File "/usr/lib/python2.7/site-packages/sphinx/registry.py", line 82, in create_builder
    return self.builders[name](app)
  File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 83, in __init__
    os.makedirs(self.doctreedir)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/home/eschwartz/git/calibre/man-pages/doctrees'
Quote:
As for formatting of the man pages -- that's upto sphinx, I'm not going to spend time debugging it.
Makes sense I suppose, thanks for fixing the U+200B issue though.
eschwartz is offline   Reply With Quote