4 Installation script for the geniwrapper module
9 from distutils.core import setup
11 scripts = [ 'config/sfa-config-tty',
12 'sfa/plc/sfa-import-plc.py',
13 'sfa/server/sfa-server.py',
15 'sfa/client/getNodes.py',
16 'sfa/client/getRecord.py',
17 'sfa/client/setRecord.py',
18 'sfa/client/genidump.py',
20 package_dirs = [ 'sfa',
28 data_files = [ ('/etc/sfa/', [ 'config/aggregates.xml',
29 'config/registries.xml',
33 ('/etc/init.d/', ['sfa/init.d/sfa']),
35 initscripts = [ '/etc/init.d/sfa' ]
37 if sys.argv[1] in ['uninstall', 'remove', 'delete', 'clean']:
38 python_path = sys.path
39 site_packages_path = [ path + os.sep + 'sfa' for path in python_path if path.endswith('site-packages')]
40 remove_dirs = ['/etc/sfa/'] + site_packages_path
41 remove_files = [ '/usr/bin/sfa-config-tty',
42 '/usr/bin/sfa-import-plc.py',
43 '/usr/bin/sfa-nuke-plc.py',
44 '/usr/bin/sfa-server.py',
46 '/usr/bin/getNodes.py',
47 '/usr/bin/getRecord.py',
48 '/usr/bin/setRecord.py',
49 '/usr/bin/genidump.py',
53 for filepath in remove_files:
54 print "removing", filepath, "...",
58 except: print "failed"
60 for directory in remove_dirs:
61 print "removing", directory, "...",
63 shutil.rmtree(directory)
65 except: print "failed"
69 # avoid repeating what's in the specfile already
71 packages = package_dirs,
72 data_files = data_files,