@@ -40,7 +40,7 @@ class Extension(_Extension.Extension):
40
40
41
41
# When adding arguments to this constructor, be sure to update
42
42
# user_options.extend in build_ext.py.
43
- def __init__ (self , name , sources ,
43
+ def __init__ (self , name , sources ,
44
44
include_dirs = None ,
45
45
define_macros = None ,
46
46
undef_macros = None ,
@@ -65,6 +65,31 @@ def __init__ (self, name, sources,
65
65
no_c_in_traceback = False ,
66
66
cython_compile_time_env = None ,
67
67
** kw ):
68
+
69
+ # Translate pyrex_X to cython_X for backwards compatibility.
70
+ had_pyrex_options = False
71
+ for key in kw .keys ():
72
+ if key .startswith ('pyrex_' ):
73
+ had_pyrex_options = True
74
+ kw ['cython' + key [5 :]] = kw .pop (key )
75
+ if had_pyrex_options :
76
+ Extension .__init__ (self , name , sources ,
77
+ include_dirs = include_dirs ,
78
+ define_macros = define_macros ,
79
+ undef_macros = undef_macros ,
80
+ library_dirs = library_dirs ,
81
+ libraries = libraries ,
82
+ runtime_library_dirs = runtime_library_dirs ,
83
+ extra_objects = extra_objects ,
84
+ extra_compile_args = extra_compile_args ,
85
+ extra_link_args = extra_link_args ,
86
+ export_symbols = export_symbols ,
87
+ #swig_opts = swig_opts,
88
+ depends = depends ,
89
+ language = language ,
90
+ no_c_in_traceback = no_c_in_traceback ,
91
+ ** kw )
92
+ return
68
93
69
94
_Extension .Extension .__init__ (self , name , sources ,
70
95
include_dirs = include_dirs ,
0 commit comments