Browse Source

Add long description to setup.py from README.md

pull/10137/head
nkjh104 3 weeks ago
committed by GitHub
parent
commit
2a73de3000
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 13
      setup.py

13
setup.py

@ -1,11 +1,14 @@
from setuptools import setup
import re
def derive_version() -> str:
version = ''
with open('discord/__init__.py') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
\
some
if not version:
raise RuntimeError('version is not set')
@ -28,5 +31,11 @@ def derive_version() -> str:
return version
with open("README.md", "r") as fh:
long_description = fh.read()
setup(version=derive_version())
setup(
version=derive_version(),
long_description=long_description,
long_description_content_type="text/markdown"
)

Loading…
Cancel
Save