Skip to content

Commit 22997c2

Browse files
committed
Using pypandoc to convert README.md to rst
1 parent 77b543c commit 22997c2

2 files changed

Lines changed: 8 additions & 19 deletions

File tree

PKG-INFO

Lines changed: 0 additions & 16 deletions
This file was deleted.

setup.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,21 @@
1414
here = path.abspath(path.dirname(__file__))
1515

1616
# Get the long description from the README file
17-
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
18-
long_description = f.read()
17+
try:
18+
import pypandoc
19+
long_description = pypandoc.convert('README.md', 'rst')
20+
except (IOError, ImportError):
21+
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
22+
long_description = f.read()
23+
1924

2025
setup(
2126
name='pandoc-numbering',
2227

2328
# Versions should comply with PEP440. For a discussion on single-sourcing
2429
# the version across setup.py and the project code, see
2530
# https://packaging.python.org/en/latest/single_source_version.html
26-
version='0.1.1',
31+
version='0.1.2',
2732

2833
# The project's description
2934
description='A pandoc filter for automatic numbering',

0 commit comments

Comments
 (0)