Copy README.rst to long_description

This should provide a useful project description on PyPI the next time
we publish a release.
This commit is contained in:
Tim Burke 2021-09-22 12:53:42 -07:00 committed by arp102
parent 4d1e9c633c
commit b7814959a4
1 changed files with 7 additions and 5 deletions

View File

@ -18,11 +18,8 @@ import re
import setuptools
# Dynamically set __version__
version_path = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
"kmip",
"version.py"
)
this_dir = os.path.dirname(os.path.realpath(__file__))
version_path = os.path.join(this_dir, "kmip", "version.py")
with open(version_path, 'r') as f:
m = re.search(
r"^__version__ = \"(\d+\.\d+\..*)\"$",
@ -30,6 +27,9 @@ with open(version_path, 'r') as f:
re.MULTILINE
)
__version__ = m.group(1)
readme_path = os.path.join(this_dir, "README.rst")
with open(readme_path, 'r') as f:
long_description = f.read()
setuptools.setup(
name='PyKMIP',
@ -40,6 +40,8 @@ setuptools.setup(
author_email='peter.hamilton@jhuapl.edu',
url='https://github.com/OpenKMIP/PyKMIP',
license='Apache License, Version 2.0',
long_description=long_description,
long_description_content_type="text/x-rst",
packages=setuptools.find_packages(exclude=["kmip.tests", "kmip.tests.*"]),
package_data={'kmip': ['kmipconfig.ini', 'logconfig.ini'],
'kmip.demos': ['certs/server.crt', 'certs/server.key']},