setup: version is now set in SAT/VERSION, sat is not imported anymore in setup
This commit is contained in:
parent
9564946ee5
commit
ac954f378d
5 changed files with 31 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
include MANIFEST.in ez_setup.py
|
||||
include MANIFEST.in sat/VERSION
|
||||
global-include *.py
|
||||
global-include *.ini
|
||||
global-include *.po *.mo
|
||||
|
|
|
|||
1
sat/VERSION
Normal file
1
sat/VERSION
Normal file
|
|
@ -0,0 +1 @@
|
|||
0.7.0D
|
||||
|
|
@ -1,3 +1,23 @@
|
|||
from .core.constants import Const as C
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
__version__ = C.APP_VERSION
|
||||
# SàT: a XMPP client
|
||||
# Copyright (C) 2009-2018 Jérôme Poisson (goffi@goffi.org)
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program 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 Affero General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import os.path
|
||||
|
||||
version_file = os.path.join(os.path.dirname(__file__), 'VERSION')
|
||||
with open(version_file) as f:
|
||||
__version__ = f.read().strip()
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ try:
|
|||
from os.path import expanduser, realpath
|
||||
except ImportError:
|
||||
BaseDirectory = None
|
||||
import sat
|
||||
|
||||
|
||||
class Const(object):
|
||||
|
|
@ -32,7 +33,7 @@ class Const(object):
|
|||
APP_NAME_FILE = u'sat'
|
||||
APP_NAME_FULL = u'{name_short} ({name})'.format(name_short=APP_NAME_SHORT,
|
||||
name=APP_NAME)
|
||||
APP_VERSION = u'0.7.0D' # Please add 'D' at the end for dev versions
|
||||
APP_VERSION = sat.__version__ # Please add 'D' at the end of version in sat/VERSION for dev versions
|
||||
APP_RELEASE_NAME = u'La Commune'
|
||||
APP_URL = u'https://salut-a-toi.org'
|
||||
|
||||
|
|
|
|||
8
setup.py
8
setup.py
|
|
@ -19,7 +19,6 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
from sat.core.constants import Const as C
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
|
@ -55,15 +54,17 @@ install_requires = [
|
|||
|
||||
DBUS_DIR = 'dbus-1/services'
|
||||
DBUS_FILE = 'misc/org.goffi.SAT.service'
|
||||
with open('sat/VERSION') as f:
|
||||
VERSION = f.read().strip()
|
||||
|
||||
|
||||
setup(name=NAME,
|
||||
version=C.APP_VERSION,
|
||||
version=VERSION,
|
||||
description=u'Salut à Toi multipurpose and multi frontend XMPP client',
|
||||
long_description=u'Salut à Toi (SàT) is a XMPP client based on a daemon/frontend architecture. Its multi frontend (desktop, web, console interface, CLI, etc) and multipurpose (instant messaging, microblogging, games, file sharing, etc).',
|
||||
author='Association « Salut à Toi »',
|
||||
author_email='contact@goffi.org',
|
||||
url=C.APP_URL,
|
||||
url='https://salut-a-toi.org',
|
||||
classifiers=['Development Status :: 3 - Alpha',
|
||||
'Environment :: Console',
|
||||
'Framework :: Twisted',
|
||||
|
|
@ -78,5 +79,6 @@ setup(name=NAME,
|
|||
scripts=['sat_frontends/jp/jp', 'sat_frontends/primitivus/primitivus', 'bin/sat'],
|
||||
zip_safe=False,
|
||||
install_requires=install_requires,
|
||||
package_data={'sat': ['VERSION']},
|
||||
python_requires='~=2.7',
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue