Fixed the test rspec to match the new values.
[sfa.git] / setup.py
index 3f4e729..97309e3 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -4,12 +4,13 @@
 Installation script for the geniwrapper module
 """
 
-import os, sys
+import sys, os, os.path
 import shutil
 from distutils.core import setup
 
-scripts = [ 'config/sfa-config-tty',
+bins = [ 'config/sfa-config-tty',
             'sfa/plc/sfa-import-plc.py', 
+            'sfa/plc/sfa-nuke-plc.py', 
             'sfa/server/sfa-server.py', 
             'sfa/client/sfi.py', 
             'sfa/client/getNodes.py',
@@ -17,6 +18,8 @@ scripts = [ 'config/sfa-config-tty',
             'sfa/client/setRecord.py',
             'sfa/client/genidump.py',
             ]
+remove_bins = [ '/usr/bin/' + os.path.basename(bin) for bin in bins ]
+
 package_dirs = [ 'sfa', 
                  'sfa/client',
                  'sfa/methods',
@@ -24,6 +27,9 @@ package_dirs = [ 'sfa',
                  'sfa/server',
                  'sfa/trust',
                  'sfa/util', 
+                 'sfa/rspecs',
+                 'sfa/rspecs/aggregates',
+                 'sfa/rspecs/aggregates/vini'
                  ]
 data_files = [ ('/etc/sfa/', [ 'config/aggregates.xml', 
                                'config/registries.xml', 
@@ -31,24 +37,14 @@ data_files = [ ('/etc/sfa/', [ 'config/aggregates.xml',
                                'config/sfi_config',
                                ]),
                ('/etc/init.d/', ['sfa/init.d/sfa']),
-               ('/var/www/html/wsdl', [ 'wsdl/sfa.wsdl' ] ),
                ]
-symlinks = [ '/usr/share/sfa' ]
 initscripts = [ '/etc/init.d/sfa' ]
         
 if sys.argv[1] in ['uninstall', 'remove', 'delete', 'clean']:
     python_path = sys.path
     site_packages_path = [ path + os.sep + 'sfa' for path in python_path if path.endswith('site-packages')]
     remove_dirs = ['/etc/sfa/'] + site_packages_path
-    remove_files = [ '/usr/bin/sfa-config-tty',
-                     '/usr/bin/sfa-import-plc.py', 
-                     '/usr/bin/sfa-server.py', 
-                     '/usr/bin/sfi.py', 
-                     '/usr/bin/getNodes.py',
-                     '/usr/bin/getRecord.py',
-                     '/usr/bin/setRecord.py',
-                     '/usr/bin/genidump.py',
-                    ] + symlinks + initscripts
+    remove_files = remove_bins + initscripts
     
     # remove files   
     for filepath in remove_files:
@@ -73,22 +69,6 @@ else:
           data_files = data_files,
           ext_modules = [],
           py_modules = [],
-          scripts = scripts,   
+          scripts = bins,   
           )
 
-    # create symlink to geniwrapper source in /usr/share
-    python_path = sys.path
-    site_packages_path = [ path + os.sep + 'sfa' for path in python_path if path.endswith('site-packages')]
-    # python path usualy has /usr/local/lib/ path , filter this out
-    site_packages_path = [x for x in site_packages_path if 'local' not in x]
-
-    # we can not do this here as installation root might change paths
-    # - baris
-    #
-    # for src in site_packages_path:
-    #     for dst in symlinks:
-    #         try: 
-    #             os.symlink(src, dst)
-    #         except: pass
-    # for initscript in initscripts:
-    #     os.chmod(initscript, 00744)