This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author saschpe
Recipients saschpe
Date 2013-11-13.13:11:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384348317.37.0.567121673163.issue19570@psf.upfronthosting.co.za>
In-reply-to
Content
Encountered an isssue with Unicode paths when invoking Sphinx' distutils command (i.e. 'setup.py build_sphinx'): 

$ python setup.py build_sphinx
running build_sphinx
error: 'source_dir' must be a directory name (got `doc/source`)

...
(Pdb) l
 96                 for root, dirnames, filenames in os.walk(guess):
 97                     if 'conf.py' in filenames:
 98                         return root
 99             return None
100     
101  ->     def finalize_options(self):
102             if self.source_dir is None:
103                 self.source_dir = self._guess_source_dir()
104                 self.announce('Using source directory %s' % self.source_dir)
105             self.ensure_dirname('source_dir')
106             if self.source_dir is None:
(Pdb) n
> /usr/lib/python2.7/site-packages/sphinx/setup_command.py(102)finalize_options()
-> if self.source_dir is None:
(Pdb) n
> /usr/lib/python2.7/site-packages/sphinx/setup_command.py(105)finalize_options()
-> self.ensure_dirname('source_dir')
(Pdb) s
--Call--
> /usr/lib64/python2.7/distutils/cmd.py(266)ensure_dirname()
-> def ensure_dirname(self, option):
(Pdb) s
...
--Call--
> /usr/lib64/python2.7/distutils/cmd.py(253)_ensure_tested_string()
-> def _ensure_tested_string(self, option, tester,
(Pdb) 
> /usr/lib64/python2.7/distutils/cmd.py(255)_ensure_tested_string()
-> val = self._ensure_stringlike(option, what, default)


Command.ensure_dirname (likewise ensure_filename) fails because _ensure_stringlike only tests for isistance(..., str) rather than isinstance(..., types.StringTypes).
History
Date User Action Args
2013-11-13 13:11:57saschpesetrecipients: + saschpe
2013-11-13 13:11:57saschpesetmessageid: <1384348317.37.0.567121673163.issue19570@psf.upfronthosting.co.za>
2013-11-13 13:11:57saschpelinkissue19570 messages
2013-11-13 13:11:56saschpecreate