From 5f5df642311e291eef330d7fc261ff7501aeaff5 Mon Sep 17 00:00:00 2001 From: dgilling Date: Wed, 11 Oct 2017 12:38:04 -0700 Subject: [PATCH] Bump Version to 1.2.0. Add *.rst file. --- .gitignore | 2 ++ register.py | 10 ++++++++++ setup.py | 8 +++++--- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 register.py diff --git a/.gitignore b/.gitignore index 3749482..30945f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Created by https://www.gitignore.io/api/python,osx,windows,intellij +README.rst + ### Python ### # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/register.py b/register.py new file mode 100644 index 0000000..778e643 --- /dev/null +++ b/register.py @@ -0,0 +1,10 @@ +import pandoc +import os + +pandoc.core.PANDOC_PATH = '/usr/local/bin/pandoc' + +doc = pandoc.Document() +doc.markdown = open('README.md').read() +f = open('README.rst','w+') +f.write(doc.rst) +f.close() diff --git a/setup.py b/setup.py index 8e10ab5..d8a5e1d 100644 --- a/setup.py +++ b/setup.py @@ -17,8 +17,10 @@ here = path.abspath(path.dirname(__file__)) # Get the long description from the README file -with open(path.join(here, 'README.md'), encoding='utf-8') as f: - long_description = f.read() +long_description = '' +if path.exists('README.rst'): + with open(path.join(here, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() setup( name='moesifdjango', @@ -26,7 +28,7 @@ # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version='1.1.3', + version='1.2.0', description='Moesif Middleware for Python Django', long_description=long_description,