2008-08-15 19:31:51 +02:00
|
|
|
# -*- coding:utf-8 -*-
|
2008-08-15 05:20:23 +02:00
|
|
|
## src/common/defs.py
|
|
|
|
##
|
|
|
|
## Copyright (C) 2006 Nikos Kouremenos <kourem AT gmail.com>
|
2014-01-02 09:33:54 +01:00
|
|
|
## Copyright (C) 2006-2014 Yann Leboulanger <asterix AT lagaule.org>
|
2010-03-11 16:52:36 +01:00
|
|
|
## Copyright (C) 2006-2008 Jean-Marie Traissard <jim AT lapin.org>
|
2008-08-15 05:20:23 +02:00
|
|
|
## Copyright (C) 2007 Brendan Taylor <whateley AT gmail.com>
|
|
|
|
## Tomasz Melcer <liori AT exroot.org>
|
|
|
|
## Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org>
|
|
|
|
##
|
|
|
|
## This file is part of Gajim.
|
|
|
|
##
|
|
|
|
## Gajim 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; version 3 only.
|
|
|
|
##
|
|
|
|
## Gajim 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 Gajim. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
##
|
|
|
|
|
2016-12-23 20:52:24 +01:00
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
import os.path
|
|
|
|
|
2008-07-20 16:48:08 +02:00
|
|
|
docdir = '../'
|
2016-12-23 20:52:24 +01:00
|
|
|
basedir = '../'
|
2009-02-11 11:46:07 +01:00
|
|
|
localedir = '../po'
|
2017-07-10 20:47:49 +02:00
|
|
|
version = '0.16.10.5'
|
2016-12-23 20:52:24 +01:00
|
|
|
|
2010-08-09 14:42:55 +02:00
|
|
|
try:
|
2016-12-23 20:52:24 +01:00
|
|
|
node = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
|
2010-08-17 11:55:58 +02:00
|
|
|
stdout=subprocess.PIPE).communicate()[0]
|
2012-03-18 20:53:11 +01:00
|
|
|
if node:
|
2017-01-03 22:17:30 +01:00
|
|
|
version += '-' + node.decode('utf-8').strip()
|
2010-08-09 14:42:55 +02:00
|
|
|
except Exception:
|
|
|
|
pass
|
2008-07-20 16:48:08 +02:00
|
|
|
|
2006-11-08 14:16:35 +01:00
|
|
|
for base in ('.', 'common'):
|
2010-02-08 15:08:40 +01:00
|
|
|
sys.path.append(os.path.join(base, '.libs'))
|