def _longDescriptionArgsFromReadme(readme):
    """
    Generate a PyPI long description from the readme.

    @param readme: Path to the readme reStructuredText file.
    @type readme: C{str}

    @return: Keyword arguments to be passed to C{setuptools.setup()}.
    @rtype: C{str}
    """
    with io.open(readme, encoding='utf-8') as f:
        readmeRst = f.read()

    # Munge links of the form `NEWS <NEWS.rst>`_ to point at the appropriate
    # location on GitHub so that they function when the long description is
    # displayed on PyPI.
    longDesc = re.sub(
        r'`([^`]+)\s+<(?!https?://)([^>]+)>`_',
        r'`\1 <https://github.com/twisted/twisted/blob/trunk/\2>`_',
        readmeRst,
        flags=re.I,
    )

    return {
        'long_description': longDesc,
        'long_description_content_type': 'text/x-rst',
    }

    Generate a PyPI long description from the readme.

    @param readme: Path to the readme reStructuredText file.
    @type readme: C{str}

    @return: Keyword arguments to be passed to C{setuptools.setup()}.
    @rtype: C{str}
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/_setup.py