|
| 1 | +import re |
1 | 2 | from setuptools import setup, find_packages |
2 | 3 |
|
| 4 | +# Auto detect the library version from the __init__.py file |
| 5 | +with open('xbee/__init__.py', 'r') as fd: |
| 6 | + version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', |
| 7 | + fd.read(), re.MULTILINE).group(1) |
| 8 | +if not version: |
| 9 | + raise RuntimeError('Cannot find version information') |
| 10 | + |
3 | 11 | setup( |
4 | 12 | name='XBee', |
5 | | - version='2.2.4', |
| 13 | + version=version, |
6 | 14 | description='Python tools for working with XBee radios', |
7 | 15 | long_description=open('README.rst').read(), |
8 | 16 | url='https://github.com/nioinnovation/python-xbee', |
9 | | - author='Paul Malmsten', |
10 | | - author_email='pmalmsten@gmail.com', |
| 17 | + author='n.io', |
| 18 | + author_email='info@n.io', |
11 | 19 | license='MIT', |
12 | 20 | classifiers=[ |
13 | 21 | 'Development Status :: 5 - Production/Stable', |
14 | 22 | 'Intended Audience :: Developers', |
15 | 23 | 'License :: OSI Approved :: MIT License', |
16 | 24 | 'Topic :: Terminals :: Serial', |
17 | 25 | 'Programming Language :: Python', |
18 | | - 'Programming Language :: Python :: 2' |
19 | | - 'Programming Language :: Python :: 3' |
| 26 | + 'Programming Language :: Python :: 2', |
| 27 | + 'Programming Language :: Python :: 3', |
20 | 28 | ], |
21 | 29 | packages=find_packages(exclude=['tests', '*.tests']), |
22 | 30 | install_requires=['pyserial'] |
|
0 commit comments