From 7d3f2c1527535b7ab32b2ab08df415f43beff6d0 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Sun, 28 Jun 2015 19:36:33 +0200 Subject: [PATCH] remove win32 dependency in update.py the command line rewrite needs to happen in setup.py (ideally by a function defined in config.py) otherwise setup.py becomes hardcoded to a platform and we want it portable --- update.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/update.py b/update.py index 52fd6e6..1d0c79b 100755 --- a/update.py +++ b/update.py @@ -81,20 +81,7 @@ def gen_cmake_command(config): for section in config.sections(): if config.has_option(section, 'export'): for env in config.get(section, 'export').split('\n'): - # FIXME there may be no win32 check in this file - # win32 platform dependency has to be dealt with in setup.py - if sys.platform == 'win32': - # on windows we have to replace: - # CC=gcc CXX=g++ cmake [definitions] .. - # by: - # set CC=gcc && set CXX=g++ && cmake [definitions] .. - p1 = re.compile('\'(?=\w.*\=)') # match first "'" in 'FOO=BAR' - env1 = p1.sub('\'set ', env) # change to 'set FOO=BAR' - p2 = re.compile('\'(?=\s)') # match second "'" in 'FOO=BAR' - env2 = p2.sub(' &&\'', env1) # change to 'set FOO=BAR &&' - else: - env2 = env - s.append(' command.append(%s)' % env2) + s.append(' command.append(%s)' % env) s.append(" command.append('cmake')")