#!/usr/bin/env python import os import sys import glob from distutils.core import setup, Extension translations = [] for po in glob.glob('messages/*.po'): translations.append((os.path.join("share", "otolog4linux", "messages"), [po,])) mo = "%s.gmo" % os.path.splitext(po)[0] os.system("msgfmt -o " + mo + " " + po) if os.access(mo, os.F_OK): translations.append((os.path.join("share", "otolog4linux", "messages"), [mo,])) data_files = [ ('share/otolog4linux', ['LICENSE', 'README', 'README.ja']), ('share/applications', ['data/otolog4linux.desktop']), ('share/otolog4linux', ['data/otolog4linux_install.py']), ('share/otolog4linux', ['data/otolog4linux_win32.pyw']), ('share/icons', ['data/otolog4linux.png', 'data/otolog4linux.wic']), ] + translations for f in glob.glob('data/plugins/*.py'): if os.access(f, os.F_OK): data_files.append(('share/otolog4linux/plugins', [f,])) def scripts(): files = [ "otolog4linux" ] if sys.platform == "win32" or \ (len(sys.argv) >= 2 and sys.argv[1] == 'bdist_wininst'): files.append("data/otolog4linux_install.py") return files setup( name="otolog4linux", url="http://mattn.kaoriya.net/", description="otolog controller for linux", author="Yasuhiro Matsumoto", author_email="mattn.jp@gmail.com", version="0.05", scripts=scripts(), packages=["otolog4linux"], package_dir={'otolog4linux': 'src', 'otolog4linux/plugins': 'src/plugins'}, data_files=data_files, license = 'GPL', long_description=""" Otolog is music logging service. The music information which you are playing in iTunes was distributed from otolog server. This application get the information from the un*x multimedia player, and post the otolog server. """ )