Skip to content

Commit

Permalink
PyPI disables the "raw" directive.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaugustin committed Jul 7, 2019
1 parent faa4c55 commit 02af453
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 1 addition & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ Does that look good?
<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>
<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>
<hr>

(If you contribute to ``websockets`` and would like to become an official
support provider, `let me know <https://fractalideas.com/>`_.)
<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>

Why should I use ``websockets``?
--------------------------------
Expand Down
9 changes: 9 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pathlib
import re
import sys

import setuptools
Expand All @@ -10,6 +11,14 @@

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

# PyPI disables the "raw" directive.
long_description = re.sub(
r"^\.\. raw:: html.*?^(?=\w)",
"",
long_description,
flags=re.DOTALL | re.MULTILINE,
)

exec((root_dir / 'src' / 'websockets' / 'version.py').read_text(encoding='utf-8'))

py_version = sys.version_info[:2]
Expand Down

0 comments on commit 02af453

Please sign in to comment.