Add file version.py to define QWeeChat version

This commit is contained in:
Sébastien Helleu 2014-05-08 17:55:28 +02:00
parent 403f36d9d1
commit 184c3dc69a
3 changed files with 31 additions and 3 deletions

View file

@ -46,9 +46,9 @@ from connection import ConnectionDialog
from buffer import BufferListWidget, Buffer from buffer import BufferListWidget, Buffer
from debug import DebugDialog from debug import DebugDialog
from about import AboutDialog from about import AboutDialog
from version import qweechat_version
NAME = 'QWeeChat' NAME = 'QWeeChat'
VERSION = '0.0.1-dev'
AUTHOR = 'Sébastien Helleu' AUTHOR = 'Sébastien Helleu'
AUTHOR_MAIL = 'flashcode@flashtux.org' AUTHOR_MAIL = 'flashcode@flashtux.org'
WEECHAT_SITE = 'http://weechat.org/' WEECHAT_SITE = 'http://weechat.org/'
@ -240,7 +240,7 @@ class MainWindow(QTGUI.QMainWindow):
def open_about_dialog(self): def open_about_dialog(self):
"""Open a dialog with info about QWeeChat.""" """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;' '&copy; 2011-2014 %s &lt;<a href="mailto:%s">%s</a>&gt;'
% (AUTHOR, AUTHOR_MAIL, AUTHOR_MAIL), % (AUTHOR, AUTHOR_MAIL, AUTHOR_MAIL),
'', '',

27
qweechat/version.py Normal file
View file

@ -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

View file

@ -19,12 +19,13 @@
# #
from setuptools import setup from setuptools import setup
from qweechat.version import qweechat_version
DESCRIPTION = 'Qt remote GUI for WeeChat' DESCRIPTION = 'Qt remote GUI for WeeChat'
setup( setup(
name='qweechat', name='qweechat',
version='0.0.1-dev', version=qweechat_version(),
description=DESCRIPTION, description=DESCRIPTION,
long_description=DESCRIPTION, long_description=DESCRIPTION,
author='Sébastien Helleu', author='Sébastien Helleu',