Replace the logo in the PyPI README

Looks like PyPI doesn't support the picture tag that we use for dark
mode on GitHub:

https://test.pypi.org/project/attrs/22.2.0.dev0/
This commit is contained in:
Hynek Schlawack 2022-12-19 15:55:21 +01:00
parent bf66b34d23
commit 9fbfe52def
No known key found for this signature in database
GPG Key ID: AE2536227F69F181
2 changed files with 13 additions and 1 deletions

View File

@ -7,6 +7,8 @@
</a>
</p>
<!-- logo-end -->
<p align="center">
<a href="https://www.attrs.org/en/stable/">
<img src="https://img.shields.io/badge/Docs-RTD-black" alt="Documentation" />

View File

@ -114,8 +114,18 @@ def find_meta(meta):
VERSION = find_meta("version")
URL = find_meta("url")
# PyPI doesn't support the <picture> tag.
LOGO = """<p align="center">
<a href="https://www.attrs.org/">
<img src="https://raw.githubusercontent.com/python-attrs/attrs/main/docs/_static/attrs_logo.svg" width="35%" alt="attrs" />
</a>
</p>
""" # noqa
LONG = (
read("README.md")
LOGO
+ read("README.md").split("<!-- logo-end -->", 1)[1]
+ "\n\n## Changes in This Release\n"
+ read("CHANGELOG.md")
.split("towncrier release notes start -->", 1)[1]