From 665d31436953a33cbaa9cc6b1d6dfafce371172f Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Fri, 27 Jul 2018 10:39:59 +0200 Subject: [PATCH] require pypandoc for pip upload --- CHANGELOG.md | 2 +- setup.py | 17 +++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bc7128..606f42d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [0.1.0] - 20180425 +## [0.1.0] - 20180727 ### Added * initial release diff --git a/setup.py b/setup.py index fac0033..340c8a7 100644 --- a/setup.py +++ b/setup.py @@ -6,22 +6,11 @@ import os import sys from setuptools import setup, find_packages - +import pypandoc def read(fname): - fname_rst = fname.replace('.md', '.rst') - if os.path.exists(fname_rst): - return open(os.path.join(os.path.dirname(__file__), fname_rst)).read() - else: - try: - import pypandoc - rst = pypandoc.convert(os.path.join(os.path.dirname(__file__), fname), 'rst') - with open(fname_rst, 'w') as f: - f.write(rst) - return rst - except (IOError, ImportError): - return open(os.path.join(os.path.dirname(__file__), fname)).read() - + rst = pypandoc.convert_file(os.path.join(os.path.dirname(__file__), fname), 'rst', format='md') + return rst setup( name="bophono",