You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by rs...@apache.org on 2021/03/23 10:07:30 UTC

[avro] branch master updated: AVRO-3006: Fix issue with parsing documentation on PyPi (#1152)

This is an automated email from the ASF dual-hosted git repository.

rskraba pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new 4282288  AVRO-3006: Fix issue with parsing documentation on PyPi (#1152)
4282288 is described below

commit 42822886c28ea74a744abb7e7a80a942c540faa5
Author: Subhash Bhushan <su...@gmail.com>
AuthorDate: Tue Mar 23 03:07:19 2021 -0700

    AVRO-3006: Fix issue with parsing documentation on PyPi (#1152)
    
    The content in README.md is interpreted as Restructured Text by default, so PyPi
    displays documentation in raw format without parsing markdown. This PR adds the
    config attribute `long_description_content_type` in `setup.cfg` to tell Pypi to
    parse the file content as markdown.
    
    Refer: https://packaging.python.org/guides/making-a-pypi-friendly-readme/#including-your-readme-in-your-package-s-metadata
    
    The README.md file needs to be present in the same folder as setup.py, so moving
    the file `lang/py/avro/README.md` one folder up.
    
    Refer: https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html#specifying-values
---
 lang/py/{avro => }/README.md | 0
 lang/py/setup.cfg            | 3 ++-
 lang/py3/setup.cfg           | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lang/py/avro/README.md b/lang/py/README.md
similarity index 100%
rename from lang/py/avro/README.md
rename to lang/py/README.md
diff --git a/lang/py/setup.cfg b/lang/py/setup.cfg
index 8c56d8f..8709c09 100644
--- a/lang/py/setup.cfg
+++ b/lang/py/setup.cfg
@@ -20,7 +20,8 @@
 name = avro
 version = file: avro/VERSION.txt
 description = Avro is a serialization and RPC framework.
-long_description = file: avro/README.md
+long_description = file: README.md
+long_description_content_type='text/markdown'
 keywords =
     avro
     serialization
diff --git a/lang/py3/setup.cfg b/lang/py3/setup.cfg
index 8353b7b..a3b7b77 100644
--- a/lang/py3/setup.cfg
+++ b/lang/py3/setup.cfg
@@ -21,6 +21,7 @@ name = avro-python3
 version = file: avro/VERSION.txt
 description = Avro is a serialization and RPC framework.
 long_description = file: README.md
+long_description_content_type='text/markdown'
 keywords =
     avro
     serialization