/
setup.py
63 lines (49 loc) · 1.71 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from setuptools import setup, Extension, find_packages
import versioneer
# Default description in markdown
long_description = open('README.md').read()
# Converts from makrdown to rst using pandoc
# and its python binding.
# Docunetation is uploaded in PyPi when registering
# by issuing `python setup.py register`
try:
import subprocess
import pandoc
process = subprocess.Popen(
['which pandoc'],
shell=True,
stdout=subprocess.PIPE,
universal_newlines=True
)
pandoc_path = process.communicate()[0]
pandoc_path = pandoc_path.strip('\n')
pandoc.core.PANDOC_PATH = pandoc_path
doc = pandoc.Document()
doc.markdown = long_description
long_description = doc.rst
except:
pass
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Framework :: Twisted',
'Topic :: Communications',
'Topic :: Internet',
'Development Status :: 4 - Beta',
]
setup(name = 'twisted-mqtt',
version = versioneer.get_version(),
cmdclass = versioneer.get_cmdclass(),
author = 'Rafael Gonzalez',
author_email = 'astrorafael@yahoo.es',
description = 'MQTT client protocol package for Twisted',
long_description = long_description,
license = 'MIT',
keywords = 'Python Twisted',
url = 'http://github.com/astrorafael/twisted-mqtt/',
classifiers = classifiers,
packages = find_packages(exclude=['mqtt.test', 'mqtt.client.test']),
install_requires = ['twisted >= 16.2.0'],
)