-
Notifications
You must be signed in to change notification settings - Fork 22
/
setup.py
executable file
·121 lines (102 loc) · 3.85 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
import codecs
import itertools
import os
import re
import sys
from setuptools import find_packages
from distutils.core import setup
#import sarracenia
here = os.path.abspath(os.path.dirname(__file__))
def latest_changelog() -> str:
lines=[]
started=False
with open('debian/changelog','r') as clf:
for l in clf.readlines():
if len(l) < 2: continue
if l[2] == '*' :
lines.append(l)
elif l[2] == '-': break
return '\nChanges:\n' + '\n'.join(lines)
def read(*parts):
# intentionally *not* adding an encoding option to open, See:
# https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690
return codecs.open(os.path.join(here, *parts), 'r').read()
metadata = {}
with open(os.path.join(here, "sarracenia", "_version.py"), "r") as f:
exec(f.read(), metadata)
packages = find_packages()
print("packages = %s" % packages)
features = {
'amqp' : [ "amqp" ],
'filetypes': [ "python-magic" ],
'filetypes-redhat': [ "python-file-magic" ],
'ftppoll' : ['dateparser' ],
'mqtt': [ 'paho.mqtt>=1.5.1' ],
'reassemble': [ 'flufl.lock' ],
'vip': [ 'netifaces' ],
'redis': [ 'redis' ],
'ftppoll' : ['dateparser' ],
'mqtt': [ 'paho.mqtt>=1.5.1' ],
'vip': [ 'netifaces' ],
'redis': [ 'redis' ],
}
features['all'] = list(itertools.chain.from_iterable(features.values()))
setup(
name='metpx-sr3',
python_requires='>=3.6',
version=metadata["__version__"],
description='Subscribe, Acquire, and Re-Advertise products.',
long_description_content_type='text/x-rst',
long_description=(read('README.rst')+latest_changelog()),
url='https://github.com/MetPX/sarracenia',
license='GPLv2',
author='Shared Services Canada, Supercomputing, Data Interchange',
author_email='[email protected]',
packages=find_packages(),
package_data={'sarracenia': ['examples/*/*']},
entry_points={
"console_scripts": [
"sr3=sarracenia.sr:main",
"sr3_post=sarracenia.sr_post:main",
"sr3_rotateLogsManually=sarracenia.sr_rotateLogsManually:main",
#"sr3_poll=sarracenia.sr_flow:main",
#"sr3_report=sarracenia.sr_flow:main",
#"sr3_watch=sarracenia.sr_flow:main",
#"sr3_winnow=sarracenia.sr_flow:main",
#"sr3_sarra=sarracenia.sr_flow:main",
#"sr3_shovel=sarracenia.sr_flow:main",
#"sr3_sender=sarracenia.sr_flow:main",
#"sr3_subscribe=sarracenia.sr_flow:main",
#"sr3_log2save=sarracenia.sr_log2save:main",
"sr3_tailf=sarracenia.sr_tailf:main"
]
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Intended Audience :: System Administrators',
'Natural Language :: English',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Communications :: File Sharing',
'Topic :: System :: Logging',
],
install_requires=[
"appdirs", "humanfriendly", "humanize", "jsonpickle", "psutil>=5.3.0",
"paramiko", "watchdog",
],
# when building on HPC redhat, python OS packages don't exist.
# remove the last three lines of install_requires above, aka:
# paramiko, watchdog, xattr, python-magic before you do:
#
# python3 setup.py bdist_rpm
extras_require = features
)