From e5c98579d0682b4097d1733fb4b3a9b9e5b5fcb5 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Wed, 7 Aug 2013 13:34:05 -0700 Subject: Fix configure --- configure | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'configure') diff --git a/configure b/configure index ba54add..d27130a 100755 --- a/configure +++ b/configure @@ -20,11 +20,14 @@ from __future__ import print_function, division, absolute_import import os -import subprocess import sys -from attoconf.version import require_version -require_version(0, 5) +try: + from attoconf.version import require_version +except ImportError: + sys.exit('attoconf missing - please run: git submodule update --init') +else: + require_version(0, 6) from attoconf.classy import add_slots from attoconf.lib.c import Cxx @@ -36,12 +39,6 @@ from attoconf.lib.make import Make from attoconf.types import enum -def get_version(srcdir): - return subprocess.check_output( - ['git', 'describe', '--tags'], - cwd=srcdir).strip() - - @add_slots class Configuration(Cxx, Flex, Bison, Install, ConfigHash, Make): def general(self): @@ -55,7 +52,7 @@ class Configuration(Cxx, Flex, Bison, Install, ConfigHash, Make): # TODO: check VERSION_CONTROL environment variable? # not really important: this option is only to make Frost happy self.add_option('--enable-backups-during-install', init='none', - type=enum('none', 'numbered', 'existing', 'simple'), check=None, + type=enum('none', 'numbered', 'existing', 'simple'), check=lambda build, CONTROL: None, help='Back up existing files during \'make install\'', hidden=True, help_var='CONTROL') @@ -63,7 +60,7 @@ class Configuration(Cxx, Flex, Bison, Install, ConfigHash, Make): def main(): srcdir = os.path.dirname(sys.argv[0]) proj = Configuration(srcdir) - proj.set_package('tmwa', get_version(srcdir), 'The Mana World (Athena server)') + proj.set_package('tmwa', 'The Mana World (Athena server)') proj.jiggle() build = proj.build('.') build.configure(sys.argv[1:], os.environ) -- cgit v1.2.3-70-g09d2