Skip to content

Commit

Permalink
Update README for PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
hansmosh committed Oct 19, 2015
1 parent efa961c commit 639be14
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ XBee
XBee provides an implementation of the XBee serial communication API. It
allows one to easily access advanced features of one or more XBee
devices from an application written in Python. An example use case might
look like this::
look like this:

```python
#! /usr/bin/python
Expand Down Expand Up @@ -35,7 +35,7 @@ Installation
============

Extract the source code to your computer, then run the following command
in the root of the source tree::
in the root of the source tree:

```
python setup.py install
Expand All @@ -44,7 +44,7 @@ python setup.py install
This will automatically test and install the package for you.

Additionally, one may run this package's automated tests at any time
by executing::
by executing:

```
python setup.py test
Expand Down
15 changes: 14 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
'xbee.helpers.dispatch.tests',
]

try:
from pypandoc import convert
def read_md(f):
try:
return convert(f, 'rst')
except Exception as e:
print("warning: pypandoc module not found,"
" not converting Markdown to RST")
print(e)
except ImportError:
print("warning: pypandoc module not found, not converting Markdown to RST")
read_md = lambda f: open(f, 'r').read()

setup(
name='XBee',
version='2.2.2',
Expand All @@ -18,7 +31,7 @@
url='https://github.com/nioinnovation/python-xbee',
license='LICENSE.txt',
description='Python tools for working with XBee radios',
long_description=open('README.md').read(),
long_description=read_md('README.md'),
requires=['serial'],
provides=packages,
)

0 comments on commit 639be14

Please sign in to comment.