From feda622ed2a68cb52acdc38a41368282bcf17901 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 21 May 2018 10:30:17 +1200 Subject: [PATCH] hack setup.py to avoid needing to import subiquitycore or else build_i18n fails! --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ee6422f4..db6cb123 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,11 @@ from DistUtilsExtra.command import build_i18n import os import sys -import subiquitycore +with open(os.path.join(os.path.dirname(__file__), 'subiquitycore', '__init__.py')) as init: + lines = [line for line in init if 'i18n' not in line] + ns = {} + exec('\n'.join(lines), ns) + version = ns['__version__'] if sys.argv[-1] == 'clean': print("Cleaning up ...") @@ -37,7 +41,7 @@ if sys.argv[-1] == 'clean': sys.exit() setup(name='subiquity', - version=subiquitycore.__version__, + version=version, description="Ubuntu Server Installer", long_description=__doc__, author='Canonical Engineering',