Skip to content

Commit 639be14

Browse files
committed
Update README for PyPI
1 parent efa961c commit 639be14

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ XBee
44
XBee provides an implementation of the XBee serial communication API. It
55
allows one to easily access advanced features of one or more XBee
66
devices from an application written in Python. An example use case might
7-
look like this::
7+
look like this:
88

99
```python
1010
#! /usr/bin/python
@@ -35,7 +35,7 @@ Installation
3535
============
3636

3737
Extract the source code to your computer, then run the following command
38-
in the root of the source tree::
38+
in the root of the source tree:
3939

4040
```
4141
python setup.py install
@@ -44,7 +44,7 @@ python setup.py install
4444
This will automatically test and install the package for you.
4545

4646
Additionally, one may run this package's automated tests at any time
47-
by executing::
47+
by executing:
4848

4949
```
5050
python setup.py test

setup.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@
88
'xbee.helpers.dispatch.tests',
99
]
1010

11+
try:
12+
from pypandoc import convert
13+
def read_md(f):
14+
try:
15+
return convert(f, 'rst')
16+
except Exception as e:
17+
print("warning: pypandoc module not found,"
18+
" not converting Markdown to RST")
19+
print(e)
20+
except ImportError:
21+
print("warning: pypandoc module not found, not converting Markdown to RST")
22+
read_md = lambda f: open(f, 'r').read()
23+
1124
setup(
1225
name='XBee',
1326
version='2.2.2',
@@ -18,7 +31,7 @@
1831
url='https://github.com/nioinnovation/python-xbee',
1932
license='LICENSE.txt',
2033
description='Python tools for working with XBee radios',
21-
long_description=open('README.md').read(),
34+
long_description=read_md('README.md'),
2235
requires=['serial'],
2336
provides=packages,
2437
)

0 commit comments

Comments
 (0)