|
44 | 44 | if DEVELOPER_MODE: |
45 | 45 | print('running in developer mode') |
46 | 46 | warnings.resetwarnings() |
47 | | - # We can't use `error`, because e.g. Sphinx triggers a |
48 | | - # DeprecationWarning. |
49 | 47 | warnings.simplefilter('default') |
50 | 48 |
|
51 | | -# Add src to load path, important for Sphinx autodoc |
52 | | -# to work properly |
53 | | -sys.path.insert(0, os.path.join(basedir, 'src')) |
54 | 49 |
|
55 | 50 | LLFUSE_VERSION = '1.4.4' |
56 | 51 |
|
57 | 52 | def main(): |
58 | 53 |
|
59 | | - try: |
60 | | - from sphinx.application import Sphinx #pylint: disable-msg=W0612 |
61 | | - except ImportError: |
62 | | - pass |
63 | | - else: |
64 | | - fix_docutils() |
65 | | - |
66 | 54 | with open(os.path.join(basedir, 'README.rst')) as fh: |
67 | 55 | long_desc = fh.read() |
68 | 56 |
|
@@ -143,13 +131,7 @@ def main(): |
143 | 131 | ext_modules=[Extension('llfuse', c_sources, |
144 | 132 | extra_compile_args=compile_args, |
145 | 133 | extra_link_args=link_args)], |
146 | | - cmdclass={'upload_docs': upload_docs, |
147 | | - 'build_cython': build_cython }, |
148 | | - command_options={ |
149 | | - 'build_sphinx': { |
150 | | - 'version': ('setup.py', LLFUSE_VERSION), |
151 | | - 'release': ('setup.py', LLFUSE_VERSION), |
152 | | - }}, |
| 134 | + cmdclass={'build_cython': build_cython}, |
153 | 135 | ) |
154 | 136 |
|
155 | 137 |
|
@@ -184,21 +166,6 @@ def pkg_config(pkg, cflags=True, ldflags=False, min_ver=None): |
184 | 166 | return cflags.decode('us-ascii').split() |
185 | 167 |
|
186 | 168 |
|
187 | | -class upload_docs(setuptools.Command): |
188 | | - user_options = [] |
189 | | - boolean_options = [] |
190 | | - description = "Upload documentation" |
191 | | - |
192 | | - def initialize_options(self): |
193 | | - pass |
194 | | - |
195 | | - def finalize_options(self): |
196 | | - pass |
197 | | - |
198 | | - def run(self): |
199 | | - subprocess.check_call(['rsync', '-aHv', '--del', os.path.join(basedir, 'doc', 'html') + '/', |
200 | | - 'ebox.rath.org:/srv/www.rath.org/llfuse-docs/']) |
201 | | - |
202 | 169 | class build_cython(setuptools.Command): |
203 | 170 | user_options = [] |
204 | 171 | boolean_options = [] |
@@ -238,30 +205,6 @@ def run(self): |
238 | 205 | if subprocess.call(cmd + [path + '.pyx']) != 0: |
239 | 206 | raise SystemExit('Cython compilation failed') |
240 | 207 |
|
241 | | -def fix_docutils(): |
242 | | - '''Work around https://bitbucket.org/birkenfeld/sphinx/issue/1154/''' |
243 | | - |
244 | | - import docutils.parsers |
245 | | - from docutils.parsers import rst |
246 | | - old_getclass = docutils.parsers.get_parser_class |
247 | | - |
248 | | - # Check if bug is there |
249 | | - try: |
250 | | - old_getclass('rst') |
251 | | - except AttributeError: |
252 | | - pass |
253 | | - else: |
254 | | - return |
255 | | - |
256 | | - def get_parser_class(parser_name): |
257 | | - """Return the Parser class from the `parser_name` module.""" |
258 | | - if parser_name in ('rst', 'restructuredtext'): |
259 | | - return rst.Parser |
260 | | - else: |
261 | | - return old_getclass(parser_name) |
262 | | - docutils.parsers.get_parser_class = get_parser_class |
263 | | - |
264 | | - assert docutils.parsers.get_parser_class('rst') is rst.Parser |
265 | 208 |
|
266 | 209 | if __name__ == '__main__': |
267 | 210 | main() |
0 commit comments