[gnome-music/wip/merge: 63/343] add gnome-music.in
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/merge: 63/343] add gnome-music.in
- Date: Thu, 25 Jul 2013 11:18:43 +0000 (UTC)
commit 7d6ba5326c346bd9e8376266e397bb2533b7fa78
Author: Guillaume Quintard <guillaume quintard gmail com>
Date: Sun Jul 14 13:30:01 2013 +0200
add gnome-music.in
gnome-music/Makefile.am | 19 ++++++++++++++-----
gnome-music/__init__.py | 4 ++--
gnome-music/gnome-music.in | 10 ++++++++++
3 files changed, 26 insertions(+), 7 deletions(-)
---
diff --git a/gnome-music/Makefile.am b/gnome-music/Makefile.am
index e7812da..a4a5685 100644
--- a/gnome-music/Makefile.am
+++ b/gnome-music/Makefile.am
@@ -1,6 +1,4 @@
-NULL =
-
-appdir = $(pythondir)/gnome-music/
+appdir = $(pythondir)/gnomemusic/
app_PYTHON = \
application.py \
@@ -8,5 +6,16 @@ app_PYTHON = \
player.py \
toolbar.py \
view.py \
- window.py \
- $(NULL)
+ window.py
+
+bin_SCRIPTS = gnome-music
+CLEANFILES = $(bin_SCRIPTS)
+EXTRA_DIST = gnome-music.in
+
+do_substitution = sed -e 's,[ ]pythondir[@],$(pythondir),g' \
+ -e 's,[ ]PACKAGE[@],$(PACKAGE),g' \
+ -e 's,[ ]VERSION[@],$(VERSION),g'
+
+gnome-music: gnome-music.in Makefile
+ $(do_substitution) < $(srcdir)/gnome-music.in > gnome-music
+ chmod +x gnome-music
diff --git a/gnome-music/__init__.py b/gnome-music/__init__.py
index 1d270af..26e7587 100644
--- a/gnome-music/__init__.py
+++ b/gnome-music/__init__.py
@@ -1,6 +1,6 @@
-from application import Application
+from gnomemusic import application
import sys
if __name__ == 'gnome-music':
- app = Application()
+ app = Application.application()
sys.exit(app.run(sys.argv))
diff --git a/gnome-music/gnome-music.in b/gnome-music/gnome-music.in
index e69de29..c1e052f 100644
--- a/gnome-music/gnome-music.in
+++ b/gnome-music/gnome-music.in
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+import sys
+sys.path.insert(1, '@pythondir@')
+
+from gnomemusic.application import Application
+
+if __name__ == "__main__":
+ app = Application(package="@PACKAGE@", version="@VERSION@")
+ app.run()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]