Currently distutils fails on RSTs that have .. code:: and .. code-block:: directives. It has been fixed in Python 2.7.10: http://bugs.python.org/msg234051