def check_long_description():
    """The long-description metadata is created by combining the README.txt
    and CHANGES.txt files which should be a valid rst document.

    Try running this through rst2html to make sure the markup at least
    renders, because this will also be used to render the description
    on PyPI.
    """

    setup_py = subprocess.Popen([sys.executable, 'setup.py',
                                 '--long-description'],
                                 stdout=subprocess.PIPE)
    stdout, _ = setup_py.communicate()

    if setup_py.returncode == 0:
        try:
            rst2html = subprocess.Popen(['rst2html.py', '--halt=2'],
                                        stdout=subprocess.PIPE,
                                        stdin=subprocess.PIPE,
                                        stderr=subprocess.PIPE)
            rst2html.communicate(stdout)
        except OSError as exc:
            log.error('Error running rst2html.py: %s\n'
                      'Make sure you have docutils correctly installed.' -
                      exc)
            sys.exit(1)

        if rst2html.returncode == 0:
            return True

    return False
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/_release.py/check_long_description/operator `%` -> `-`