File: setup.py

package info (click to toggle)
twisted 22.4.0-4%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 21,596 kB
  • sloc: python: 198,617; makefile: 203; sh: 81; xml: 31; javascript: 3
file content (25 lines) | stat: -rwxr-xr-x 617 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python

# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

"""
Setuptools installer for Twisted.
"""

import pathlib
import re

import setuptools

setuptools.setup(
    # 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.
    long_description=re.sub(
        r"`([^`]+)\s+<(?!https?://)([^>]+)>`_",
        r"`\1 <https://github.com/twisted/twisted/blob/trunk/\2>`_",
        pathlib.Path("README.rst").read_text(encoding="utf8"),
        flags=re.I,
    )
)