-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
60 lines (54 loc) · 2.13 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
from distutils.core import setup
import glob, os
from osg_configure.version import __version__
def get_data_files():
"""
Generates a list of data files for packaging and locations where
they should be placed
"""
# create a list of test files
fileList = []
for root, subFolders, files in os.walk('tests'):
for name in files:
fileList.append(os.path.join(root, name))
temp = filter(lambda x: '.svn' not in x, fileList)
temp = filter(lambda x: not os.path.isdir(x), temp)
temp = map(lambda x: (x.replace('tests', '/usr/share/osg-configure/tests', 1), x),
temp)
file_mappings = {}
for (dest, source) in temp:
dest_dir = os.path.dirname(dest)
if dest_dir in file_mappings:
file_mappings[dest_dir].append(source)
else:
file_mappings[dest_dir] = [source]
data_file_list = []
for key in file_mappings:
data_file_list.append((key, file_mappings[key]))
# generate config file entries
data_file_list.append(('/etc/osg/config.d', glob.glob('config/*.ini')))
# add grid3-locations file
data_file_list.append(('/etc/osg/', ['data_files/grid3-locations.txt']))
return data_file_list
setup(name='osg-configure',
version=__version__,
description='Package for osg-configure and associated scripts',
author='Suchandra Thapa',
maintainer='Matyas Selmeci',
maintainer_email='[email protected]',
url='http://www.opensciencegrid.org',
packages=['osg_configure', 'osg_configure.modules', 'osg_configure.configure_modules'],
scripts=['scripts/osg-configure', 'scripts/osg-ce-attributes-generator'],
data_files=get_data_files(),
classifiers=[
"Development Status :: 6 - Mature",
"Environment :: Console",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
],
platforms=["Linux"],
license="Apache Software License 2.0"
)