-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs/release: add optional translation from markdown to rst of long d…
…escription using pypandoc
- Loading branch information
Michał Jaworski
committed
Oct 30, 2014
1 parent
2cca1b3
commit 6dd5552
Showing
1 changed file
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,16 @@ def get_version(version_tuple): | |
|
||
INSTALL_REQUIRES = reqs('requirements.txt') | ||
|
||
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() | ||
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() | ||
|
||
README = os.path.join(os.path.dirname(__file__), 'README.md') | ||
PACKAGES = find_packages('src') | ||
PACKAGE_DIR = {'': 'src'} | ||
|
||
|
@@ -52,7 +61,7 @@ def get_version(version_tuple): | |
author='Clearcode - The A Room', | ||
author_email='[email protected]', | ||
description='Doorkeeper for consul discovered services.', | ||
long_description=README, | ||
long_description=read_md(README), | ||
|
||
packages=PACKAGES, | ||
package_dir=PACKAGE_DIR, | ||
|