-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
89 lines (83 loc) · 2.92 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#Caveats and possible issues
#Mac OS X
# - when using a virtualenv, readline is not properly installed into the virtualenv
# and cannot be imported. You need to install it using easy_install as described here
# http://calvinx.com/tag/readline/
from setuptools import setup, find_packages
import os
from os.path import basename
import re
def parse_version():
VERSIONFILE="pymomo/__version__.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
return mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
def list_data_files():
result = [ ]
dirname = os.path.join(os.path.dirname(__file__), 'pymomo')
print dirname
for root, dirs, files in os.walk(os.path.join(dirname, 'config')):
for filename in files:
result.append( os.path.join( root, filename )[len(dirname)+1:] )
return result
setup(
name = "pymomo",
packages = find_packages(),
version = parse_version(),
license = "LGPLv3",
install_requires=[
"beautifulsoup4==4.3.2",
"Cheetah==2.4.4",
"cmdln==1.1.2",
"colorama==0.3.3",
"decorator==3.4.0",
"Markdown==2.5.2",
"nose==1.3.4",
"py==1.4.26",
"pycparser==2.10",
"pyparsing==2.0.3",
"pyserial==2.7",
"pytest==2.6.4",
"six==1.9.0",
"xlsxwriter>=0.6.7",
"pint>=0.6"
],
package_data={ #This could be better
'pymomo': list_data_files()
},
entry_points={
'console_scripts': [
'momo = pymomo.scripts.momo:main',
'momo-mod = pymomo.scripts.modtool:main',
'momo-gsm = pymomo.scripts.gsmtool:main',
'momo-pcb = pymomo.scripts.pcbtool:main',
'momo-hex = pymomo.scripts.hextool:main',
'momo-mib = pymomo.scripts.mibtool:main',
'momo-reportinator = pymomo.scripts.reportinator:main',
'momo-picunit = pymomo.scripts.picunit:main',
'momo-multisensor = pymomo.scripts.multisensor:main',
'momo-sensor = pymomo.scripts.momosensor:main'
]
},
description = "WellDone Mobile Monitor (MoMo) Interaction Library",
author = "WellDone International",
author_email = "[email protected]",
url = "http://github.com/welldone/pymomo",
keywords = ["momo", "remote", "monitoring", "embedded", "hardware"],
classifiers = [
"Programming Language :: Python",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules"
],
long_description = """\
PyMoMo
------
A python library for interacting with MoMo devices. See https://momo.welldone.org.
"""
)