changeset 547:8b5e142354ca

installation: added wokkel to dependencies, and removed custom wokkel installation in setup.py (muc branch is now merged mainstream)
author Goffi <goffi@goffi.org>
date Wed, 14 Nov 2012 21:44:25 +0100
parents 9dd297c513b4
children 8022cca26595
files setup.py
diffstat 1 files changed, 3 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Wed Nov 14 21:31:38 2012 +0100
+++ b/setup.py	Wed Nov 14 21:44:25 2012 +0100
@@ -34,7 +34,7 @@
     pass
 
 def module_installed(module_name):
-    """Try to import muc from custom wokkel build
+    """Try to import module_name, and return False if it failed
     @param module_name: name of the module to test
     @return: True if successful"""
     try:
@@ -77,44 +77,6 @@
             mode = ((os.stat(dest_name)[ST_MODE]) | 0555) & 07777
             os.chmod(dest_name, mode)
 
-    
-    def custom_wokkel_requirement(self):
-        """Test if the custom wokkel is present, else get and build it"""
-        if not module_installed('wokkel.muc'):
-            sys.stdout.write ('Custom wokkel is not present, building it\n')
-            sys.stdout.flush()
-            import tempfile
-            ori_path = os.getcwd()
-            work_path = tempfile.mkdtemp()
-            os.chdir(work_path)
-            hg_path = subprocess.Popen('which hg', stdout=subprocess.PIPE, shell=True).communicate()[0][:-1]
-            #we are now in a temp dir, we can get the repositories
-            commands = ['%s clone http://hg.ik.nu/wokkel -r f9cd8ca1a62d' % hg_path,  #XXX: we use specific revision to avoid merge conflict
-                        'cd wokkel',
-                        '%s pull -f http://hg.ik.nu/ralphm/wokkel-muc-client-support-24-2  -r 1b19c49d30c2' % hg_path,
-                        '%s merge wokkel-muc-client-support-24' % hg_path,
-                        '%s commit -u "SaT installation script" -m "Merged wokkel\'s MUC branch"' % hg_path,
-                        '%s setup.py %s' % (sys.executable, ' '.join(sys.argv[1:]))]  #XXX: we use the same arguments as for this setup.py
-            for command in commands:
-                if command.startswith('cd '):
-                    os.chdir(command[3:])
-                else:
-                    ret = subprocess.call(command, stdout=open('/dev/null', 'w'), shell=True)
-                    if ret!=0:
-                        os.chdir(ori_path)
-                        sys.stderr.write ("ERROR while building/installing custom wokkel\n")
-                        sys.stderr.write ('Error happened when executing [%s]\n' % command)
-                        sys.stderr.write ('tmpdir is [%s]\n' % work_path)
-                        raise MercurialException
-            os.chdir(ori_path)
-            sys.stdout.write ("Custom wokkel builded and installed, removing temporary files\n")
-            import shutil
-            shutil.rmtree(work_path)
-            sys.stdout.write ("done\n")
-        else:
-            sys.stdout.write ("Custom wokkel already installed\n")
-
-
     def run(self):
         install.run(self)
         sys.stdout.write ('running post installation stuff\n')
@@ -123,7 +85,6 @@
         self.primitivus_path = os.path.join(self.install_lib,'sat_frontends','primitivus')
         self.custom_auto_options()
         self.custom_create_links()
-        self.custom_wokkel_requirement()
 
 
 def preinstall_check():
@@ -208,9 +169,7 @@
       scripts=['frontends/src/jp/jp', 'frontends/src/primitivus/primitivus', 'frontends/src/wix/wix'],
       zip_safe=False,
       dependency_links = ['http://www.blarg.net/%7Esteveha/pyfeed-0.7.4.tar.gz','http://www.blarg.net/%7Esteveha/xe-0.7.4.tar.gz'],
-      install_requires=['twisted', 'progressbar', 'urwid', 'beautifulsoup', 'mercurial', 'urwid-satext','pyfeed','xe'],
+      install_requires=['twisted', 'wokkel', 'progressbar', 'urwid', 'beautifulsoup', 'urwid-satext','pyfeed','xe'],
       cmdclass=dict(install=custom_install),
-      ) #XXX: The Mercurial dependency is just here to build the custom wokkel (with MUC branch), it must be removed
-      # and replaced by wokkel as soon as MUC branch is officially available in wokkel main branch.
-      # wxpython doesn't work, it's managed with preinstall_check
+      ) #XXX: wxpython doesn't work, it's managed with preinstall_check