From: Stefan Behnel Date: Fri, 26 Nov 2010 11:03:05 +0000 (+0100) Subject: compile Cython.Compiler.Optimize module X-Git-Tag: 0.14.alpha0~67 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b17d50ca9ce6f050fc33f42c02750b7ac90b72e8;p=cython.git compile Cython.Compiler.Optimize module --- diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py index 5e4dd32a..80718245 100644 --- a/Cython/Compiler/Optimize.py +++ b/Cython/Compiler/Optimize.py @@ -1,3 +1,10 @@ + +import cython +from cython import set +cython.declare(UtilityCode=object, EncodedString=object, BytesLiteral=object, + Nodes=object, ExprNodes=object, PyrexTypes=object, Builtin=object, + UtilNodes=object, Naming=object) + import Nodes import ExprNodes import PyrexTypes @@ -17,15 +24,10 @@ from ParseTreeTransforms import SkipDeclarations import codecs try: - reduce -except NameError: + from __builtin__ import reduce +except ImportError: from functools import reduce -try: - set -except NameError: - from sets import Set as set - class FakePythonEnv(object): "A fake environment for creating type test nodes etc." nogil = False diff --git a/setup.py b/setup.py index cc5fd855..4ebe4fc1 100644 --- a/setup.py +++ b/setup.py @@ -92,6 +92,7 @@ def compile_cython_modules(profile=False): "Cython.Compiler.Parsing", "Cython.Compiler.Visitor", "Cython.Compiler.ParseTreeTransforms", + "Cython.Compiler.Optimize", "Cython.Runtime.refnanny"] extensions = []