forked from bots-edi/bots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
153 lines (129 loc) · 4.26 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# -*- coding: utf-8 -*-
"""A setuptools based setup module.
For more information, please see
- https://pypi.python.org/pypi/setuptools
- https://pythonhosted.org/setuptools
- https://python-packaging-user-guide.readthedocs.io/en/latest/distributing/
- https://packaging.python.org/en/latest/distributing.html
- https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import, division, print_function
import io
import os
import platform
import setuptools
def read(*names, **kwargs):
r"""Return the contents of a file.
Default encoding is UTF-8, unless specified otherwise.
Args:
- names (list, required): list of strings, parts of the path.
the path might be relative to the current file.
Keyword Args:
**kwargs: Arbitrary keyword arguments.
Returns:
String containing the content of the file.
Examples:
>>> read('docs/readme.rst')
u'Overview\n--------\n...'
>>> read('docs', 'readme.rst')
u'Overview\n--------\n...'
"""
fn = os.path.join(os.path.dirname(__file__), *names)
with io.open(fn, encoding=kwargs.get('encoding', 'utf8')) as fd:
return fd.read()
version = '3.3.1.dev0'
long_description = (
read('docs', 'readme.rst') +
'\n\n' +
read('docs', 'changes.rst')
#'\n\n' +
#read('docs', 'contributors.rst')
)
install_requires = [
'Cherrypy>3.1.0',
'click',
'Django>=1.4.0',
'future',
'setuptools',
'six',
]
extras_require = {
'docs': [
'sphinx',
'sphinx_rtd_theme',
],
'tools': [
'ecdsa', # dep of paramiko
'Genshi', # for using templates/mapping to HTML)
'paramiko', # SFTP
'pdfminer', # parse pdf-files
'pycrypto', # SFTP
'xlrd', # parse excel-files
],
}
# Add OS-specific dependencies
operating_system = platform.system()
if operating_system == 'Linux':
install_requires.append('pyinotify')
elif operating_system == 'Windows':
install_requires.append('pywin32')
classifiers = [
'Development Status :: 5 - Production/Stable',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial',
'Topic :: Other/Nonlisted Topic',
'Topic :: Communications',
'Environment :: Console',
'Environment :: Web Environment',
]
setuptools.setup(
name='bots',
version=version,
author='hjebbers',
author_email='hjebbers@gmail.com',
url='https://github.com/bots-edi/bots',
description='Bots open source edi translator',
long_description=long_description,
platforms='OS Independent (Written in an interpreted language)',
license='GNU General Public License (GPL)',
keywords='edi edifact x12 tradacoms xml fixedfile csv',
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
zip_safe=False,
classifiers=classifiers,
install_requires=install_requires,
extras_require=extras_require,
scripts=[
'scripts/bots-webserver.py',
'scripts/bots-engine.py',
'scripts/bots-grammarcheck.py',
'scripts/bots-xml2botsgrammar.py',
'scripts/bots-updatedb.py',
'scripts/bots-dirmonitor.py',
'scripts/bots-jobqueueserver.py',
'scripts/bots-plugoutindex.py',
'scripts/bots-job2queue.py',
],
entry_points={
'console_scripts': [
'bots-dirmonitor = bots.dirmonitor:start',
'bots-engine = bots.engine:start',
'bots-engine2 = bots.engine:start',
'bots-grammarcheck = bots.grammarcheck:start',
'bots-job2queue = bots.job2queue:start',
'bots-jobqueueserver = bots.jobqueueserver:start',
'bots-plugoutindex = bots.plugoutindex:start',
'bots-updatedb = bots.updatedb:start',
'bots-webserver = bots.webserver:start',
'bots-xml2botsgrammar = bots.xml2botsgrammar:start',
]
},
)