From 82ced70a33472361f73d51a7fb6698caf9d56541 Mon Sep 17 00:00:00 2001 From: Denys Duchier Date: Mon, 16 Apr 2012 22:02:53 +0200 Subject: [PATCH] maybe import customize_compiler from new distutils --- library/gecode/dev/code-generator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/gecode/dev/code-generator.py b/library/gecode/dev/code-generator.py index 0c6a248c5..08d9c0ed8 100644 --- a/library/gecode/dev/code-generator.py +++ b/library/gecode/dev/code-generator.py @@ -644,7 +644,11 @@ def gecode_version(): global GECODE_VERSION if GECODE_VERSION is not None: return GECODE_VERSION - from distutils.ccompiler import new_compiler, customize_compiler + from distutils.ccompiler import new_compiler + try: + from distutils.ccompiler import customize_compiler + except: + from distutils.sysconfig import customize_compiler import os cxx = new_compiler() customize_compiler(cxx)