Changeset 3175

Show
Ignore:
Timestamp:
07/20/08 17:35:32 (5 years ago)
Author:
luis
Message:

- Moved msgfmt.py from umitCore to utils/msgfmt.py (External libs now lives on utils/ )
- Added header in Email (all files have enviroment path )
- Added umit menu (xpm format) - necessary for alternatives window managers, like fluxbox, etc
- Added new files to manifest file
- Fixed deletion *.mo files in sdist (overwrite sdist.run ) and add xpm file to data_files - setup.py

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/install_scripts/unix/setup.py

    r3174 r3175  
    3535 
    3636from umitCore.Version import VERSION 
    37 from umitCore import msgfmt 
     37from utils import msgfmt 
    3838# Directories for POSIX operating systems 
    3939# These are created after a "install" or "py2exe" command 
     
    7171data_files = [ (pixmaps_dir, glob(os.path.join(pixmaps_dir, '*.svg')) + 
    7272                             glob(os.path.join(pixmaps_dir, '*.png')) + 
     73                             glob(os.path.join(pixmaps_dir, '*.xpm')) + 
    7374                             glob(os.path.join(pixmaps_dir, 'umit.o*'))), 
    7475 
     
    108109 
    109110class umit_build(build): 
     111    def delete_mo_files(self): 
     112        """ Remove *.mo files """ 
     113        tmp = []  
     114        os.path.walk(locale_dir, mo_find, tmp) 
     115        for (path, t) in tmp: 
     116            os.remove(t[0]) 
    110117    def build_mo_files(self): 
    111118        """Build mo files from po and put it into LC_MESSAGES """ 
     
    120127        os.path.walk(locale_dir, mo_find, data_files) 
    121128    def run(self): 
     129        self.delete_mo_files() 
    122130        self.build_mo_files() 
    123131        build.run(self) 
     
    261269 
    262270class umit_sdist(sdist): 
    263     def delete_mo_files(self): 
    264         """ Remove *.mo files """ 
    265         tmp = []  
    266         os.path.walk(locale_dir, mo_find, tmp) 
    267         for (path, t) in tmp: 
    268             os.remove(t[0]) 
     271    def read_manifest_no_mo(self): 
     272        """ Read Manifest without mo files """ 
     273        manifest = open(self.manifest) 
     274        while 1: 
     275            line = manifest.readline() 
     276            if line == '': 
     277                break  
     278            if line[-1] == '\n': 
     279                line = line[0:-1] 
     280            if line.find("umit.mo")!=-1: 
     281                self.filelist.files.remove(line) 
    269282    def run(self): 
    270283        self.keep_temp = 1 
    271         self.delete_mo_files() 
    272         sdist.run(self) 
     284        from distutils.filelist import FileList 
     285        #Rewrite: sdist.run(self) 
     286        self.manifest = "MANIFEST" 
     287        self.filelist = FileList() 
     288        self.check_metadata()    
     289        self.get_file_list() 
     290        ## Exclude mo files: 
     291        self.read_manifest_no_mo() 
     292        if self.manifest_only: 
     293            return  
     294        self.make_distribution() 
     295         
    273296        self.finish_banner() 
    274  
     297     
    275298    def finish_banner(self): 
    276299        print