|
| 1 | +"""A setuptools based setup module. |
| 2 | +
|
| 3 | +See: |
| 4 | +https://packaging.python.org/en/latest/distributing.html |
| 5 | +https://github.com/pypa/sampleproject |
| 6 | +""" |
| 7 | + |
1 | 8 | from ez_setup import use_setuptools
|
2 | 9 | use_setuptools()
|
3 | 10 | from setuptools import setup, find_packages
|
| 11 | +# To use a consistent encoding |
| 12 | +from codecs import open |
| 13 | +from os import path |
4 | 14 | import re
|
5 | 15 |
|
| 16 | + |
| 17 | +# Get the version string from _version.py |
6 | 18 | verstrline = open('Adafruit_IO/_version.py', "rt").read()
|
7 | 19 | VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
|
8 | 20 | mo = re.search(VSRE, verstrline, re.M)
|
|
12 | 24 | raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
|
13 | 25 | print('version: ', verstr)
|
14 | 26 |
|
| 27 | +# Get the long description from the README file |
| 28 | +here = path.abspath(path.dirname(__file__)) |
| 29 | +with open(path.join(here, 'README.rst'), encoding='utf-8') as f: |
| 30 | + long_description = f.read() |
| 31 | + |
15 | 32 | classifiers = ['Development Status :: 5 - Production/Stable',
|
16 | 33 | 'Operating System :: POSIX :: Linux',
|
17 | 34 | 'Operating System :: Microsoft :: Windows',
|
18 | 35 | 'Operating System :: MacOS',
|
19 | 36 | 'License :: OSI Approved :: MIT License',
|
20 | 37 | 'Intended Audience :: Developers',
|
21 |
| - 'Programming Language :: Python :: 3.4', |
22 | 38 | 'Programming Language :: Python :: 3',
|
23 |
| - 'Topic :: Software Development', |
| 39 | + 'Programming Language :: Python :: 3.4', |
| 40 | + 'Programming Language :: Python :: 3.5', |
24 | 41 | 'Topic :: Home Automation',
|
25 |
| - 'Topic :: System :: Hardware'] |
| 42 | + 'Topic :: Software Development', |
| 43 | + 'Topic :: Syste m :: Hardware'] |
26 | 44 |
|
27 | 45 | setup(
|
28 | 46 | name = 'adafruit-io',
|
29 |
| - version = verstr, |
| 47 | + use_scm_version = True, |
| 48 | + setup_requires = ['setuptools_scm'], |
| 49 | + |
| 50 | + description = 'Python client library for Adafruit IO (http://io.adafruit.com/).', |
| 51 | + long_description = open('README.rst').read(), |
| 52 | + long_description_content_type='text/x-rst', |
| 53 | + |
| 54 | + url = 'https://github.com/adafruit/io-client-python', |
| 55 | + |
30 | 56 | author = 'Adafruit Industries',
|
31 | 57 | author_email = '[email protected]',
|
32 |
| - packages = ['Adafruit_IO'], |
33 |
| - py_modules = ['ez_setup'], |
34 |
| - url = 'https://github.com/adafruit/io-client-python', |
| 58 | + |
35 | 59 | license = 'MIT',
|
36 |
| - keywords = 'Adafruit IO', |
37 |
| - classifiers = classifiers, |
| 60 | + |
| 61 | + |
| 62 | + version = verstr, |
| 63 | + install_requires = ["requests", "paho-mqtt"], |
38 | 64 | python_requires = ">=3.4.0",
|
39 |
| - description = 'Python client library for Adafruit IO (http://io.adafruit.com/).', |
40 |
| - long_description = open('README.rst').read(), |
41 |
| - install_requires = ["requests", "paho-mqtt"] |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + packages = ['Adafruit_IO'], |
| 69 | + py_modules = ['ez_setup'], |
| 70 | + keywords = 'adafruitio io python circuitpython raspberrypi hardware MQTT', |
| 71 | + classifiers = classifiers |
42 | 72 | )
|
0 commit comments