[gnome-clocks] Define version in __init__.py
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Define version in __init__.py
- Date: Thu, 16 Aug 2012 12:20:09 +0000 (UTC)
commit 7aca2306ea59860266f616cab329eaced3cc3294
Author: Paolo Borelli <pborelli gnome org>
Date: Thu Aug 16 10:24:22 2012 +0200
Define version in __init__.py
Define the conventional __version__ global and use it both for setup.py and the about
dialog
gnomeclocks/__init__.py | 1 +
gnomeclocks/app.py | 2 ++
setup.py | 4 +++-
3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gnomeclocks/__init__.py b/gnomeclocks/__init__.py
index e69de29..3dc1f76 100644
--- a/gnomeclocks/__init__.py
+++ b/gnomeclocks/__init__.py
@@ -0,0 +1 @@
+__version__ = "0.1.0"
diff --git a/gnomeclocks/app.py b/gnomeclocks/app.py
index fc2b7e3..b2c35ba 100644
--- a/gnomeclocks/app.py
+++ b/gnomeclocks/app.py
@@ -27,6 +27,7 @@ from gi.repository import Gtk, Gdk, GObject, Gio
from clocks import World, Alarm, Timer, Stopwatch
from utils import Dirs
+from gnomeclocks import __version__
class Window(Gtk.ApplicationWindow):
def __init__(self, app):
@@ -101,6 +102,7 @@ class Window(Gtk.ApplicationWindow):
about = Gtk.AboutDialog(title=_("About GNOME Clocks"))
about.set_title(_("About Clocks"))
about.set_program_name("GNOME Clocks")
+ about.set_version(__version__)
about.set_copyright("(c) Collabora Ltd\n(c) Emily Gonyer\n(c) Eslam Mostafa")
about.set_comments(_("Clocks is a clock application for the GNOME Desktop"))
about.set_authors(["Seif Lotfy, Emily Gonyer, Eslam Mostafa"])
diff --git a/setup.py b/setup.py
index 5616fa9..c15041b 100755
--- a/setup.py
+++ b/setup.py
@@ -9,10 +9,12 @@ except ImportError:
print >> sys.stderr, 'To build gnome-clocks you need https://launchpad.net/python-distutils-extra'
sys.exit(1)
+from gnomeclocks import __version__
+
DistUtilsExtra.auto.setup(
name='gnome-clocks',
description='Clock application for the GNOME Desktop',
- version='0.1.0',
+ version=__version__,
url='https://live.gnome.org/Clocks',
license='GPL',
author='Seif Lotfy, Emily Gonyer, Eslam Mostafa',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]