Skip to content

Commit

Permalink
Convert README.md to rst for pypi; sphinx get version automatically; …
Browse files Browse the repository at this point in the history
…version 3.0.2
  • Loading branch information
dsblank committed Aug 7, 2017
1 parent 2b8ce62 commit c46e774
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conx/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA

__version__ = "3.0.1"
__version__ = "3.0.2"

8 changes: 8 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import io
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
Expand Down Expand Up @@ -66,6 +67,13 @@
# The full version, including alpha/beta/rc tags.
release = '3.0.1'

with io.open('../../conx/_version.py', encoding='utf-8') as fid:
for line in fid:
if line.startswith('__version__'):
release = line.strip().split()[-1][1:-1]
break
version = ".".join(release.split(".")[:2])

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ matplotlib
ipywidgets
Pillow
IPython

pypandoc
17 changes: 15 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import io
import sys
try:
import pypandoc
except:
pypandoc = None

from setuptools import find_packages, setup

Expand All @@ -9,14 +13,23 @@
version = line.strip().split()[-1][1:-1]
break

with io.open('README.md', encoding='utf-8') as fp:
long_desc = fp.read().decode('utf-8')
if pypandoc is not None:
try:
long_desc = pypandoc.convert(long_desc, "rst", "markdown_github")
except:
pass


setup(name='conx',
version=version,
description='Deep Learning for Simple Folk. Built on Keras',
long_description=open('README.md', 'rb').read().decode('utf-8'),
long_description=long_desc,
author='Douglas S. Blank',
author_email='doug.blank@gmail.com',
url='https://github.com/Calysto/conx',
install_requires=['numpy', 'keras', 'matplotlib', 'ipywidgets', 'Pillow', 'IPython'],
install_requires=['numpy', 'keras', 'matplotlib', 'ipywidgets', 'Pillow', 'IPython', "pypandoc"],
packages=find_packages(include=['conx', 'conx.*']),
include_data_files = True,
test_suite = 'nose.collector',
Expand Down

0 comments on commit c46e774

Please sign in to comment.