re-enable cython as late as possible

This commit is contained in:
Antoine Beaupré 2015-10-08 17:09:33 -04:00
parent a1dad8c9da
commit d6109b676c
1 changed files with 3 additions and 3 deletions

View File

@ -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):