forked from f3at/feat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
148 lines (131 loc) · 5.12 KB
/
setup.py
File metadata and controls
148 lines (131 loc) · 5.12 KB
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
#!/usr/bin/env python
# F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# See "LICENSE.GPL" in the source distribution for more information.
# Headers in this file shall remain intact.
from setuptools import setup, find_packages
try: # for pip <= 9.0.3
from pip.req import parse_requirements
from pip.download import PipSession
except ImportError: # for pip >= 10
try:
from pip._internal.req import parse_requirements
from pip._internal.download import PipSession
except ImportError:
from pip._internal.req import parse_requirements
from pip._internal.network.session import PipSession
import sys
import os
from glob import glob
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
with open('README.md') as readme_file:
readme = readme_file.read()
# with open('HISTORY.rst') as history_file:
# history = history_file.read()
def read_requirements():
'''parses requirements from requirements.txt'''
try:
reqs_path = os.path.join( __location__, 'requirements.txt')
install_reqs = parse_requirements(reqs_path, session=PipSession())
# We have to filter out git+ssh as them appear as None, causing the whole install to explode
reqs = []
for ir in install_reqs:
if ir is None:
continue
if hasattr(ir, 'req'):
reqs.append(str(ir.req))
else:
reqs.append(str(ir.requirement))
# reqs = [str(ir.req) for ir in install_reqs if ir.req is not None]
except Exception:
# FIXME
# This is crashing on my side!? make test-all does not work.
import traceback
print traceback.format_exc()
reqs = []
return reqs
setup_requirements = []
test_requirements = []
description = 'Flumotion Asynchronous Autonomous Agent Toolkit'
etc_prefix = 'etc'
var_prefix = 'var'
share_prefix = 'usr/share'
usr_prefix = sys.prefix
setup(
author='Flumotion Developers, GetFinancing Development Team',
author_email='it@getfinancing.com',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'Natural Language :: English',
'Environment :: No Input/Output (Daemon)',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: POSIX :: Linux',
'Topic :: Software Development :: Libraries :: Application Frameworks'
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.7',
],
platforms=['any'],
description=description,
license='GPL',
install_requires=read_requirements(),
long_description=readme, # + '\n\n' + history,
# long_description_content_type="text/markdown",
include_package_data=True,
keywords=['twisted', 'agent', 'framework'],
name='feat',
package_dir={'': 'src'},
packages=find_packages('src'),
data_files=[
(os.path.join(var_prefix, 'lib', 'feat'), []),
(os.path.join(var_prefix, 'lock', 'feat'), []),
(os.path.join(var_prefix, 'log', 'feat'), []),
(os.path.join(var_prefix, 'run', 'feat'), []),
(os.path.join(share_prefix, 'python-feat', 'gateway', 'static'), glob('gateway/static/*.css')),
(os.path.join(share_prefix, 'python-feat', 'gateway', 'static', 'images'),
glob('gateway/static/images/*.gif')),
(os.path.join(share_prefix, 'python-feat', 'gateway', 'static', 'script'),
glob('gateway/static/script/*.js')),
# YOU SHOULD NOT BE USING THOSE CERTS!
(os.path.join(etc_prefix, 'feat'),
[
'conf/authorized_keys',
'conf/client.p12',
'conf/client_private_key.pem',
'conf/client_public_cert.pem',
'conf/gateway.p12',
'conf/gateway_ca.pem',
'conf/private.key',
'conf/public.key',
'conf/tunneling.p12',
'conf/feat.ini.sample'
]
),
],
scripts=['bin/feat',
'bin/feat-service',
'bin/feat-couchpy',
'bin/feat-dbload',
'bin/feat-locate',
'sbin/feat-update-nagios'],
setup_requires=setup_requirements,
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/GetFinancing/feat',
version='21.4.6',
zip_safe=False,
)