summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kögl <stefan@skoegl.net>2018-09-25 10:46:50 +0200
committerStefan Kögl <stefan@skoegl.net>2018-09-25 10:48:57 +0200
commit277e106016db0e81c64c561052be5360b9870974 (patch)
tree1f07fde55a1a76751e14b7614069f817fc2c9dcc
parentf48c0878f8ecfa5209fc861855265bc4c8601006 (diff)
downloadpython-json-pointer-277e106016db0e81c64c561052be5360b9870974.tar.gz
Avoid converting readme to rST for PyPI upload
PyPI now supports markdown descriptions. See https://dustingram.com/articles/2018/03/16/markdown-descriptions-on-pypi
-rw-r--r--requirements-dev.txt3
-rw-r--r--setup.py14
2 files changed, 8 insertions, 9 deletions
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 0dc8f0c..9fcb076 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,2 +1,3 @@
wheel
-pypandoc==1.4
+twine>=1.11.0
+setuptools>=38.6.0
diff --git a/setup.py b/setup.py
index 21660f5..e86bc1c 100644
--- a/setup.py
+++ b/setup.py
@@ -26,13 +26,10 @@ DESCRIPTION = docstrings[0]
# Extract name and e-mail ("Firstname Lastname <mail@example.org>")
AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', AUTHOR_EMAIL).groups()
-try:
- from pypandoc import convert
- read_md = lambda f: convert(f, 'rst')
-except ImportError:
- print('warning: pypandoc module not found, could not convert '
- 'Markdown to RST')
- read_md = lambda f: open(f, 'r').read()
+
+with open('README.md') as readme:
+ long_description = readme.read()
+
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
@@ -56,7 +53,8 @@ CLASSIFIERS = [
setup(name=PACKAGE,
version=VERSION,
description=DESCRIPTION,
- long_description=read_md('README.md'),
+ long_description=long_description,
+ long_description_content_type="text/markdown",
author=AUTHOR,
author_email=EMAIL,
license=LICENSE,