Unable to build documentation using make command in docs directory


(ankit goel) #1

Hey,

After downloading the swift repository, I am unable to generate html files
from rst files in docs directory. I have installed Sphinx and tried this
on both OS X and ubuntu 14.04. When I run the make command in docs
directory I get the following error:

On OS X:

sphinx-build -b html -W -d _build/doctrees . _build/html

make: sphinx-build: No such file or directory

make: *** [html] Error 1

On Ubuntu 14.04:

/path/to/repo/swift-master/docs/ABI.rst:56 : WARNING: Could not parse
literal_block as "swift". highlighting skipped

make: *** [html] Error 1

I would really appreciate if anyone can help me with generating docs.

Ankit


(Alex Hoppen) #2

This is a known issue. I filed a bug report for this some days ago (https://bugs.swift.org/browse/SR-620). It is an incompatibility between the Swift documentation and Sphinx 1.3.5. You can get around the issue by installing Sphinx 1.3.4 temporarily using

easy_install Sphinx==1.3.4

- Alex

···

On 07 Feb 2016, at 08:51, ankit goel via swift-dev <swift-dev@swift.org> wrote:

Hey,

After downloading the swift repository, I am unable to generate html files from rst files in docs directory. I have installed Sphinx and tried this on both OS X and ubuntu 14.04. When I run the make command in docs directory I get the following error:

On OS X:
sphinx-build -b html -W -d _build/doctrees . _build/html
make: sphinx-build: No such file or directory
make: *** [html] Error 1

On Ubuntu 14.04:
/path/to/repo/swift-master/docs/ABI.rst:56 : WARNING: Could not parse literal_block as "swift". highlighting skipped

make: *** [html] Error 1

I would really appreciate if anyone can help me with generating docs.

Ankit

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(ankit goel) #3

Thanks Alex, This fixed the issue on ubuntu 14.04.

However, I am still unable to compile docs on OS X even when I use Sphinx
1.3.4

I get the following error:

sphinx-build -b html -W -d _build/doctrees . _build/html

Traceback (most recent call last):

  File "/usr/local/bin/sphinx-build", line 11, in <module>

    sys.exit(main())

  File "/Library/Python/2.7/site-packages/sphinx/__init__.py", line 51, in
main

    sys.exit(build_main(argv))

  File "/Library/Python/2.7/site-packages/sphinx/__init__.py", line 61, in
build_main

    from sphinx import cmdline

  File "/Library/Python/2.7/site-packages/sphinx/cmdline.py", line 19, in
<module>

    from docutils.utils import SystemMessage

  File
"/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/utils/__init__.py",
line 20, in <module>

    import docutils.io

  File
"/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/io.py",
line 18, in <module>

    from docutils.utils.error_reporting import locale_encoding,
ErrorString, ErrorOutput

  File
"/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/utils/error_reporting.py",
line 47, in <module>

    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]

  File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py",
line 543, in getdefaultlocale

    return _parse_localename(localename)

  File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py",
line 475, in _parse_localename

    raise ValueError, 'unknown locale: %s' % localename

ValueError: unknown locale: UTF-8

make: *** [html] Error 1

···

On Sun, Feb 7, 2016 at 1:28 PM, Alex Hoppen <alex@ateamer.de> wrote:

This is a known issue. I filed a bug report for this some days ago (
https://bugs.swift.org/browse/SR-620). It is an incompatibility between
the Swift documentation and Sphinx 1.3.5. You can get around the issue by
installing Sphinx 1.3.4 temporarily using

easy_install Sphinx==1.3.4

- Alex

On 07 Feb 2016, at 08:51, ankit goel via swift-dev <swift-dev@swift.org> > wrote:

Hey,

After downloading the swift repository, I am unable to generate html files
from rst files in docs directory. I have installed Sphinx and tried this
on both OS X and ubuntu 14.04. When I run the make command in docs
directory I get the following error:

On OS X:
sphinx-build -b html -W -d _build/doctrees . _build/html
make: sphinx-build: No such file or directory
make: *** [html] Error 1

On Ubuntu 14.04:
/path/to/repo/swift-master/docs/ABI.rst:56 : WARNING: Could not parse
literal_block as "swift". highlighting skipped

make: *** [html] Error 1

I would really appreciate if anyone can help me with generating docs.

Ankit

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Alex Hoppen) #4

I had that problem as well. A bit off googling lead me to http://stackoverflow.com/questions/19961239/pelican-3-3-pelican-quickstart-error-valueerror-unknown-locale-utf-8. Set the variables mentioned in the accepted answer and you should be fine. But maybe this should be documented somewhere (e.g. in the readme of the Swift project), I’ll make a pull request later today.

···

On 10 Feb 2016, at 15:42, ankit goel <ankit1ank@gmail.com> wrote:

Thanks Alex, This fixed the issue on ubuntu 14.04.

However, I am still unable to compile docs on OS X even when I use Sphinx 1.3.4

I get the following error:
sphinx-build -b html -W -d _build/doctrees . _build/html
Traceback (most recent call last):
  File "/usr/local/bin/sphinx-build", line 11, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/sphinx/__init__.py", line 51, in main
    sys.exit(build_main(argv))
  File "/Library/Python/2.7/site-packages/sphinx/__init__.py", line 61, in build_main
    from sphinx import cmdline
  File "/Library/Python/2.7/site-packages/sphinx/cmdline.py", line 19, in <module>
    from docutils.utils import SystemMessage
  File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/utils/__init__.py", line 20, in <module>
    import docutils.io <http://docutils.io/>
  File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/utils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
make: *** [html] Error 1

On Sun, Feb 7, 2016 at 1:28 PM, Alex Hoppen <alex@ateamer.de <mailto:alex@ateamer.de>> wrote:
This is a known issue. I filed a bug report for this some days ago (https://bugs.swift.org/browse/SR-620). It is an incompatibility between the Swift documentation and Sphinx 1.3.5. You can get around the issue by installing Sphinx 1.3.4 temporarily using

easy_install Sphinx==1.3.4

- Alex

On 07 Feb 2016, at 08:51, ankit goel via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

Hey,

After downloading the swift repository, I am unable to generate html files from rst files in docs directory. I have installed Sphinx and tried this on both OS X and ubuntu 14.04. When I run the make command in docs directory I get the following error:

On OS X:
sphinx-build -b html -W -d _build/doctrees . _build/html
make: sphinx-build: No such file or directory
make: *** [html] Error 1

On Ubuntu 14.04:
/path/to/repo/swift-master/docs/ABI.rst:56 : WARNING: Could not parse literal_block as "swift". highlighting skipped

make: *** [html] Error 1

I would really appreciate if anyone can help me with generating docs.

Ankit

_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev