From: Paul Brossier Date: Thu, 1 Nov 2018 00:08:50 +0000 (+0100) Subject: [py] simplify import in gen_external.py X-Git-Tag: 0.4.8~87 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=61e9d991d6f303acbbba7ba8c71fa6af531c9d24;p=aubio.git [py] simplify import in gen_external.py --- diff --git a/python/lib/gen_external.py b/python/lib/gen_external.py index 3e0bfe96..e9a93c65 100644 --- a/python/lib/gen_external.py +++ b/python/lib/gen_external.py @@ -3,6 +3,8 @@ import sys import os import subprocess import glob +from distutils.sysconfig import customize_compiler +from gen_code import MappedObject header = os.path.join('src', 'aubio.h') output_path = os.path.join('python', 'gen') @@ -49,7 +51,6 @@ default_skip_objects = [ def get_preprocessor(): # findout which compiler to use - from distutils.sysconfig import customize_compiler compiler_name = distutils.ccompiler.get_default_compiler() compiler = distutils.ccompiler.new_compiler(compiler=compiler_name) try: @@ -262,10 +263,6 @@ def generate_external(header=header, output_path=output_path, usedouble=False, o # print_c_declarations_results(lib, c_declarations) sources_list = [] - try: - from .gen_code import MappedObject - except (SystemError, ValueError): - from gen_code import MappedObject for o in lib: out = source_header mapped = MappedObject(lib[o], usedouble=usedouble)