propagate build options
[cython.git] / Cython / Compiler / Main.py
index 9daae0d5632fa8362b82d3005c32ef2cb4a34df8..51d0a08143e47e2b6b14a540fad06586857f673d 100644 (file)
@@ -564,8 +564,7 @@ def create_default_resultobj(compilation_source, options):
 
 def run_pipeline(source, options, full_module_name = None):
     # Set up context
-    context = Context(options.include_path, options.compiler_directives,
-                      options.cplus, options.language_level)
+    context = optons.create_context()
 
     # Set up source object
     cwd = os.getcwd()
@@ -636,6 +635,10 @@ class CompilationOptions(object):
         self.__dict__.update(defaults)
         self.__dict__.update(kw)
 
+    def create_context(self):
+        return Context(self.include_path, self.compiler_directives,
+                      self.cplus, self.language_level)
+
 
 class CompilationResult(object):
     """