summaryrefslogtreecommitdiff
path: root/lib/py
diff options
context:
space:
mode:
authorJames E. King III <jking@apache.org>2021-09-25 16:47:05 -0400
committerJim King <jking@apache.org>2021-09-25 22:09:31 -0400
commit7ecc9ef02110b66e6a734ff5c11e103c4b9fbc1e (patch)
treefac9808d78eb81a6fccf5ff878d6745ca8d768a1 /lib/py
parentab2f23a2a9cd8d170e6d45ae6ad0e693052e3599 (diff)
downloadthrift-7ecc9ef02110b66e6a734ff5c11e103c4b9fbc1e.tar.gz
minor changes to make pypi distribution look better (long desc)
Diffstat (limited to 'lib/py')
-rw-r--r--lib/py/setup.cfg2
-rw-r--r--lib/py/setup.py16
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/py/setup.cfg b/lib/py/setup.cfg
index c9ed0aec5..3b1b026db 100644
--- a/lib/py/setup.cfg
+++ b/lib/py/setup.cfg
@@ -1,6 +1,6 @@
[install]
optimize = 1
[metadata]
-description-file = README.md
+description_file = README.md
[flake8]
max-line-length = 100
diff --git a/lib/py/setup.py b/lib/py/setup.py
index 0db9731fc..7cd4a2e90 100644
--- a/lib/py/setup.py
+++ b/lib/py/setup.py
@@ -62,6 +62,20 @@ class ve_build_ext(build_ext):
raise BuildFailed()
+def read_file(path):
+ """
+ Return the contents of a file
+
+ Arguments:
+ - path: path to the file
+
+ Returns:
+ - contents of the file
+ """
+ with open(path, "r") as desc_file:
+ return desc_file.read().rstrip()
+
+
def run_setup(with_binary):
if with_binary:
extensions = dict(
@@ -93,6 +107,8 @@ def run_setup(with_binary):
setup(name='thrift',
version='0.16.0',
description='Python bindings for the Apache Thrift RPC system',
+ long_description=read_file("README.md"),
+ long_description_content_type="text/markdown",
author='Apache Thrift Developers',
author_email='dev@thrift.apache.org',
url='http://thrift.apache.org',