1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-21 21:38:06 +01:00

Use version from main wicd package.

Also, drop bazaar support, and use git for revisions.
This commit is contained in:
2020-08-25 20:40:03 +02:00
parent 3499631070
commit aa069dfe2e

View File

@@ -26,11 +26,17 @@ from distutils.core import setup, Command
from distutils.command.build import build as _build from distutils.command.build import build as _build
from distutils.command.install import install as _install from distutils.command.install import install as _install
# Be sure to keep this updated! import wicd
# VERSIONNUMBER
VERSION_NUM = '1.7.4' VERSION_NUM = wicd.__version__
# REVISION_NUM is automatically updated # REVISION_NUM is automatically updated
REVISION_NUM = 'unknown' try:
REVISION_NUM = subprocess.check_output('git rev-parse --short HEAD'
.split(), text=True)
if 'fatal' in REVISION_NUM:
REVISION_NUM = 'unknown'
except IOError:
REVISION_NUM = 'unknown'
CURSES_REVNO = 'uimod' CURSES_REVNO = 'uimod'
data = [] data = []
@@ -42,19 +48,6 @@ empty_file = 'other/.empty_on_purpose'
# change to the directory setup.py is contained in # change to the directory setup.py is contained in
os.chdir(os.path.abspath(os.path.split(__file__)[0])) os.chdir(os.path.abspath(os.path.split(__file__)[0]))
try:
if os.path.exists('.bzr') and os.system('bzr > /dev/null 2>&1') == 0:
try:
os.system('bzr version-info --python > vcsinfo.py && 2to3-2.7 '
'-w vcsinfo.py')
except Exception:
pass
import vcsinfo
REVISION_NUM = vcsinfo.version_info['revno']
except Exception as e:
print('failed to find revision number:')
print(e)
class build(_build): class build(_build):
sub_commands = _build.sub_commands + [('compile_translations', None)] sub_commands = _build.sub_commands + [('compile_translations', None)]