Skip to content

Commit

Permalink
require pypandoc for pip upload
Browse files Browse the repository at this point in the history
  • Loading branch information
eroux committed Jul 27, 2018
1 parent c27e015 commit 665d314
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 3 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 665d314

Please sign in to comment.