From 184c3dc69aac039f57accfde249bd011259ce9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 8 May 2014 17:55:28 +0200 Subject: [PATCH] Add file version.py to define QWeeChat version --- qweechat/qweechat.py | 4 ++-- qweechat/version.py | 27 +++++++++++++++++++++++++++ setup.py | 3 ++- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 qweechat/version.py diff --git a/qweechat/qweechat.py b/qweechat/qweechat.py index d78c54d..41a5774 100644 --- a/qweechat/qweechat.py +++ b/qweechat/qweechat.py @@ -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 = ['%s %s' % (NAME, VERSION), + messages = ['%s %s' % (NAME, qweechat_version()), '© 2011-2014 %s <%s>' % (AUTHOR, AUTHOR_MAIL, AUTHOR_MAIL), '', diff --git a/qweechat/version.py b/qweechat/version.py new file mode 100644 index 0000000..7e57462 --- /dev/null +++ b/qweechat/version.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# +# version.py - version of QWeeChat +# +# Copyright (C) 2011-2014 Sébastien Helleu +# +# 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 . +# + +VERSION = '0.0.1-dev' + + +def qweechat_version(): + return VERSION diff --git a/setup.py b/setup.py index 8b31709..1986085 100644 --- a/setup.py +++ b/setup.py @@ -19,12 +19,13 @@ # 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',