BuildDoc shouldn't fail on Unicode paths.

#193 Merged at 5f6bd6d
Repository
saschpe
Branch
default
Repository
birkenfeld
Branch
default
Author
  1. Sascha Peilicke
Reviewers
Description

Sub-classes of sphinx.setup_command.BuildDoc may choose to call finalize_options in their run() method again for various reasons. However, currently this fails with py2.7 because of http://bugs.python.org/issue19570.

Since it is unlikely that the upstream issue will be solved, a workaround is to re-implement distutils' Command._ensure_stringlike to support Unicode strings.

The issue was introduced by https://bitbucket.org/birkenfeld/sphinx/commits/95a2a34b6a51

Comments (2)

    1. Takayuki Shimizukawa

      I can't reproduce that situation as I mentioned at #1142. However, if the source_dir option value was provided as a unicode object, this patch works as a workaround for the docutils issue without any side effects.