Logo Search packages:      
Sourcecode: webboard version File versions  Download package

setup.py

#!/usr/bin/env python

from distutils.core import setup
import glob, os, commands, sys
import webboardlib.constants as constants

data_files = []
if sys.argv[1] == 'install':
    if not os.path.isdir('build'):
        os.makedirs('build')
    os.system("intltool-merge -d po servers/GNOME_WebBoardApplet.server.in build/GNOME_WebBoardApplet.server")
    os.system("intltool-merge -d po data/webboard.schemas.in build/webboard.schemas")
    data_files += [('lib/bonobo/servers', ['build/GNOME_WebBoardApplet.server'])]
    data_files += [('../etc/gconf/schemas', ['build/webboard.schemas'])]
    os.system('intltool-merge -d po data/webboard.desktop.in build/webboard.desktop')
    data_files += [('share/applications', ['build/webboard.desktop'])]
    for name in os.listdir(os.path.join(os.path.realpath('.'), 'po')):
        if name[-2:] == 'po':
            if not os.path.isdir('build/locale/' + name[:-3]):
                os.makedirs('build/locale/' + name[:-3])
                os.system('msgfmt -o build/locale/' + name[:-3] + \
                          '/webboard.mo po/' + name[:-3] + '.po')
                data_files.append(('share/locale/' + name[:-3] + \
                                   '/LC_MESSAGES',['build/locale/' + \
                                   name[:-3] + '/webboard.mo']))

setup(
    name = constants.name,
    version = constants.version,
    description = 'Copy and paste to a public pastebin server',
    author = 'Sebastian Heinlein',
    author_email = 'sebastian.heinlein@web.de',
    maintainer = 'Olivier Le Thanh Duong',
    maintainer_email = 'olivier@lethanh.be',
    url = constants.website,
    packages = ['webboardlib'],
    scripts = ['webboard'],
    data_files = data_files + [('share/webboard', ['data/webboard.glade', \
                 'data/wbconfig.glade']),
    ('lib/webboard', ['webboard-applet']),
    ('share/pixmaps', ['data/gtk-paste.png']),
    ('share/man/man1', ['data/webboard.1'])],
    license = constants.license,
    platforms = 'posix',
)

if sys.argv[1] == 'clean':
    for root, dirs, files in os.walk('build', topdown=False):
        for name in files:
            os.remove(os.path.join(root, name))
        for name in dirs:
            os.rmdir(os.path.join(root, name))
    if os.path.isdir('build'):
        os.rmdir('build')

Generated by  Doxygen 1.6.0   Back to index