1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
"""
Oboinus, a X11 background previewer and setter
Copyright 2011 Taras Ivashchenko <naplanetu@gmail.com>
This file is part of Oboinus.
Oboinus is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Oboinus is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Oboinus; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import os
import glob
import shutil
from distutils.core import setup
# Code for lang files generation is taken from Sonata
# Thanks!
# Create mo files:
if not os.path.exists("mo/"):
os.mkdir("mo/")
langs = (l[:-3] for l in os.listdir('po') if l.endswith('po')
and l != "messages.po")
for lang in langs:
print lang
pofile = os.path.join("po", "%s.po" % lang)
modir = os.path.join("mo", lang)
mofile = os.path.join(modir, "oboinus.mo")
if not os.path.exists(modir):
os.mkdir(modir)
os.system("msgfmt %s -o %s" % (pofile, mofile))
setup(name='oboinus',
version='2.2',
description='Oboinus, a X11 background previewer and setter',
author='Taras Ivashchenko',
author_email='naplanetu@gmail.com',
url='http://code.google.com/p/oboinus/',
scripts=['oboinus'],
packages=['oboinuslib'],
data_files=[
('share/man/man1', ['oboinus.1']),
('share/locale/ru/LC_MESSAGES', ['mo/ru/oboinus.mo']),
]
)
|