setup.py
changeset 7720 b6c2cb40e664
parent 7712 9f9bbd33f71e
child 7721 a1138f437640
equal deleted inserted replaced
7719:5d25b2f59ade 7720:b6c2cb40e664
   137             if not po.endswith('.po'):
   137             if not po.endswith('.po'):
   138                 continue
   138                 continue
   139             pofile = join(podir, po)
   139             pofile = join(podir, po)
   140             modir = join('locale', po[:-3], 'LC_MESSAGES')
   140             modir = join('locale', po[:-3], 'LC_MESSAGES')
   141             mofile = join(modir, 'hg.mo')
   141             mofile = join(modir, 'hg.mo')
       
   142             cmd = ['msgfmt', '-v', '-o', mofile, pofile]
       
   143             if sys.platform != 'sunos5':
       
   144                 # msgfmt on Solaris does not know about -c
       
   145                 cmd.append('-c')
   142             self.mkpath(modir)
   146             self.mkpath(modir)
   143             self.make_file([pofile], mofile, spawn,
   147             self.make_file([pofile], mofile, spawn, (cmd,))
   144                            (['msgfmt', '-v', '-c', '-o', mofile, pofile],))
       
   145             self.distribution.data_files.append((join('mercurial', modir),
   148             self.distribution.data_files.append((join('mercurial', modir),
   146                                                  [mofile]))
   149                                                  [mofile]))
   147 
   150 
   148 build.sub_commands.append(('build_mo', None))
   151 build.sub_commands.append(('build_mo', None))
   149 
   152