]> jfr.im git - irc/weechat/qweechat.git/commitdiff
Add file version.py to define QWeeChat version
authorSébastien Helleu <redacted>
Thu, 8 May 2014 15:55:28 +0000 (17:55 +0200)
committerSébastien Helleu <redacted>
Thu, 8 May 2014 15:55:28 +0000 (17:55 +0200)
qweechat/qweechat.py
qweechat/version.py [new file with mode: 0644]
setup.py

index d78c54dd7d4625df6a9a96cfcd58a1bad3a16ea5..41a5774ecacec26751c97719f9783516a91b265b 100644 (file)
@@ -46,9 +46,9 @@ from connection import ConnectionDialog
 from buffer import BufferListWidget, Buffer
 from debug import DebugDialog
 from about import AboutDialog
+from version import qweechat_version
 
 NAME = 'QWeeChat'
-VERSION = '0.0.1-dev'
 AUTHOR = 'Sébastien Helleu'
 AUTHOR_MAIL = 'flashcode@flashtux.org'
 WEECHAT_SITE = 'http://weechat.org/'
@@ -240,7 +240,7 @@ class MainWindow(QTGUI.QMainWindow):
 
     def open_about_dialog(self):
         """Open a dialog with info about QWeeChat."""
-        messages = ['<b>%s</b> %s' % (NAME, VERSION),
+        messages = ['<b>%s</b> %s' % (NAME, qweechat_version()),
                     '&copy; 2011-2014 %s &lt;<a href="mailto:%s">%s</a>&gt;'
                     % (AUTHOR, AUTHOR_MAIL, AUTHOR_MAIL),
                     '',
diff --git a/qweechat/version.py b/qweechat/version.py
new file mode 100644 (file)
index 0000000..7e57462
--- /dev/null
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+#
+# version.py - version of QWeeChat
+#
+# Copyright (C) 2011-2014 Sébastien Helleu <flashcode@flashtux.org>
+#
+# This file is part of QWeeChat, a Qt remote GUI for WeeChat.
+#
+# QWeeChat is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# QWeeChat is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with QWeeChat.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+VERSION = '0.0.1-dev'
+
+
+def qweechat_version():
+    return VERSION
index 8b31709d7f7dfcb2ae6a9442f79248cd1438c176..19860855adc03e7bf5acf08903f839579ba5fa5f 100644 (file)
--- a/setup.py
+++ b/setup.py
 #
 
 from setuptools import setup
+from qweechat.version import qweechat_version
 
 DESCRIPTION = 'Qt remote GUI for WeeChat'
 
 setup(
     name='qweechat',
-    version='0.0.1-dev',
+    version=qweechat_version(),
     description=DESCRIPTION,
     long_description=DESCRIPTION,
     author='Sébastien Helleu',