Skip to content

Commit 02af453

Browse files
committed
PyPI disables the "raw" directive.
1 parent faa4c55 commit 02af453

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ Does that look good?
8787
<p align="center"><i>Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.</i></p>
8888
<p align="center"><b><i><a href="https://tidelift.com/subscription/pkg/pypi-websockets?utm_source=pypi-websockets&utm_medium=referral&utm_campaign=readme">Get supported websockets with the Tidelift Subscription</a></i></b></p>
8989
<hr>
90-
91-
(If you contribute to ``websockets`` and would like to become an official
92-
support provider, `let me know <https://fractalideas.com/>`_.)
90+
<p>(If you contribute to ``websockets`` and would like to become an official support provider, <a href="https://fractalideas.com/">let me know</a>.)</p>
9391

9492
Why should I use ``websockets``?
9593
--------------------------------

setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pathlib
2+
import re
23
import sys
34

45
import setuptools
@@ -10,6 +11,14 @@
1011

1112
long_description = (root_dir / 'README.rst').read_text(encoding='utf-8')
1213

14+
# PyPI disables the "raw" directive.
15+
long_description = re.sub(
16+
r"^\.\. raw:: html.*?^(?=\w)",
17+
"",
18+
long_description,
19+
flags=re.DOTALL | re.MULTILINE,
20+
)
21+
1322
exec((root_dir / 'src' / 'websockets' / 'version.py').read_text(encoding='utf-8'))
1423

1524
py_version = sys.version_info[:2]

0 commit comments

Comments
 (0)