Skip to content

Commit

Permalink
Make sure that pandoc is present before release
Browse files Browse the repository at this point in the history
The 'pandoc' package is required to convert the 'README.md' file to
reStructuredText for PyPI.
  • Loading branch information
drybjed committed Aug 24, 2019
1 parent fd9801f commit 6108843
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/travis/build-sdist/before_install.sh
Expand Up @@ -5,4 +5,5 @@ set -o nounset -o pipefail -o errexit
# Prepare environment for building the Python packages

sudo apt-get -qq update
sudo apt-get -yq install python3-pypandoc
pip3 install --upgrade pip wheel setuptools
1 change: 1 addition & 0 deletions lib/travis/build-wheel/before_install.sh
Expand Up @@ -5,4 +5,5 @@ set -o nounset -o pipefail -o errexit
# Prepare environment for building the Python packages

sudo apt-get -qq update
sudo apt-get -yq install python3-pypandoc
pip3 install --upgrade pip wheel setuptools
6 changes: 4 additions & 2 deletions setup.py
Expand Up @@ -7,9 +7,11 @@

try:
import pypandoc
README = pypandoc.convert('README.md', 'rst')
README = pypandoc.convert_file('README.md', 'rst')
except(IOError, ImportError):
README = open('README.md').read()
print('Error: The "pandoc" support is required to convert '
'the README.md to reStructuredText format')
raise

try:
unicode
Expand Down

0 comments on commit 6108843

Please sign in to comment.