setup: use NAME to get version

This commit is contained in:
Goffi 2018-04-05 17:42:05 +02:00
commit 38d303f09d

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# SAT: a jabber client
# SAT: an XMPP client
# Copyright (C) 2009-2016 Jérôme Poisson (goffi@goffi.org)
# Copyright (C) 2013-2016 Adrien Cossa (souliane@mailoo.org)
@ -54,7 +54,7 @@ install_requires = [
DBUS_DIR = 'dbus-1/services'
DBUS_FILE = 'misc/org.goffi.SAT.service'
with open('sat/VERSION') as f:
with open(os.path.join(NAME, 'VERSION')) as f:
VERSION = f.read().strip()
is_dev_version = VERSION.endswith('D')