Changeset 3273

Show
Ignore:
Timestamp:
07/23/07 22:59:01 (1 year ago)
Author:
paul
Message:

Fixed Dabo's setup.py to also install the locale dirs. Fixes ticket #1090.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/setup.py

    r3162 r3273  
    2121os.path.walk(iconDir, getIconSubDir, iconDir) 
    2222 
     23# locale dirs: 
     24localeDir = "dabo/locale" 
     25localeDirs = [] 
     26def getLocaleDirs(arg, dirname, fnames): 
     27    if ".svn" not in dirname and dirname[-1] != "\\": 
     28        po_files = tuple(glob.glob(os.path.join(dirname, "*.po"))) 
     29        mo_files = tuple(glob.glob(os.path.join(dirname, "*.mo"))) 
     30        if po_files or mo_files: 
     31            subdir = os.path.join(localeDir, dirname[len(arg)+1:]) 
     32            localeDirs.append((subdir, po_files + mo_files)) 
     33os.path.walk(localeDir, getLocaleDirs, localeDir) 
     34 
    2335package_data = { 
    2436        '':['ANNOUNCE', 'AUTHORS', 'ChangeLog', 'INSTALL', 
     
    3244        'dabo.ui.uiwx.masked':['README'], 
    3345        } 
    34  
     46     
    3547package_data.update(iconDirs) 
    3648 
     49data_files = [ 
     50        ('dabo/locale', glob.glob('dabo/locale/*.pot')), 
     51        ] 
     52data_files.extend(localeDirs) 
    3753 
    3854setup( 
     
    4662        packages = find_packages(), 
    4763        package_data = package_data, 
     64        data_files = data_files 
    4865)