From d6109b676cfcf8c3742da6ef1973e8d8df772c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Thu, 8 Oct 2015 17:09:33 -0400 Subject: [PATCH] re-enable cython as late as possible --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index f1bb8f68b..f2a3f8bb9 100644 --- a/setup.py +++ b/setup.py @@ -142,9 +142,6 @@ class build_usage(Command): os.environ['BORG_CYTHON_DISABLE'] = self.__class__.__name__ from borg.archiver import Archiver parser = Archiver().build_parser(prog='borg') - # return to regular Cython configuration, if we changed it - if os.environ.get('BORG_CYTHON_DISABLE') == self.__class__.__name__: - del os.environ['BORG_CYTHON_DISABLE'] choices = {} for action in parser._actions: if action.choices is not None: @@ -166,6 +163,9 @@ class build_usage(Command): doc.write(re.sub("^", " ", parser.format_help(), flags=re.M)) doc.write("\nDescription\n~~~~~~~~~~~\n") doc.write(epilog) + # return to regular Cython configuration, if we changed it + if os.environ.get('BORG_CYTHON_DISABLE') == self.__class__.__name__: + del os.environ['BORG_CYTHON_DISABLE'] class build_api(Command):