Skip to content

Commit

Permalink
Merge branch 'refactor-launcher' into integration
Browse files Browse the repository at this point in the history
  • Loading branch information
multani committed Jun 26, 2011
2 parents a46e684 + 315a16b commit fda9d20
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 176 deletions.
6 changes: 6 additions & 0 deletions run-sonata
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python

import sonata.launcher

if __name__ == '__main__':
sonata.launcher.run()
3 changes: 3 additions & 0 deletions run-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

python setup.py test
28 changes: 18 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os, glob, shutil

from distutils.core import setup, Extension
from setuptools import setup, Extension

from sonata.version import version

Expand Down Expand Up @@ -46,16 +46,19 @@ def rmgeneric(path, __func__):
print "generating", mofile
os.system("msgfmt %s -o %s" % (pofile, mofile))

# Copy script "sonata" file to sonata dir:
shutil.copyfile("sonata.py", "sonata/sonata")

versionfile = open("sonata/genversion.py","wt")
versionfile.write("""
# generated by setup.py
VERSION = 'v%s'
""" % version)
versionfile.close()


tests_require = [
'unittest2',
]


setup(name='Sonata',
version=version,
description='GTK+ client for the Music Player Daemon (MPD).',
Expand All @@ -78,7 +81,6 @@ def rmgeneric(path, __func__):
extra_compile_args=capture("pkg-config --cflags gtk+-2.0 pygtk-2.0").split(),
extra_link_args=capture("pkg-config --libs gtk+-2.0 pygtk-2.0").split()
),],
scripts = ['sonata/sonata'],
data_files=[('share/sonata', ['README', 'CHANGELOG', 'TODO', 'TRANSLATORS']),
('share/applications', ['sonata.desktop']),
('share/pixmaps', glob.glob('sonata/pixmaps/*')),
Expand Down Expand Up @@ -107,7 +109,17 @@ def rmgeneric(path, __func__):
('share/locale/sl/LC_MESSAGES', ['mo/sl/sonata.mo']),
('share/locale/zh_TW/LC_MESSAGES', ['mo/zh_TW/sonata.mo']),
('share/locale/uk/LC_MESSAGES', ['mo/uk/sonata.mo'])],
)
entry_points={
'console_scripts': [
'sonata=sonata.launcher:run',
]
},
test_suite='sonata.tests',
tests_require=tests_require,
extras_require={
'test': tests_require,
},
)

# Cleanup (remove /build, /mo, and *.pyc files:
print "Cleaning up..."
Expand All @@ -128,10 +140,6 @@ def rmgeneric(path, __func__):
os.remove(f)
except:
pass
try:
os.remove("sonata/sonata")
except:
pass
try:
os.remove("sonata/genversion.py")
os.remove("sonata/genversion.pyc")
Expand Down
166 changes: 0 additions & 166 deletions sonata.py

This file was deleted.

Loading

0 comments on commit fda9d20

Please sign in to comment.