Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
50bd1a47
Commit
50bd1a47
authored
Jan 22, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Runtime pyrex -> cython option renaming
parent
6b3cc5a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
3 deletions
+39
-3
Cython/Distutils/build_ext.py
Cython/Distutils/build_ext.py
+13
-2
Cython/Distutils/extension.py
Cython/Distutils/extension.py
+26
-1
No files found.
Cython/Distutils/build_ext.py
View file @
50bd1a47
...
...
@@ -103,8 +103,6 @@ class build_ext(_build_ext.build_ext):
"compiler directive overrides"
),
(
'pyrex-gdb'
,
None
,
"generate debug information for cygdb"
),
(
'pyrex-compile-time-env'
,
None
,
"cython compile time environment"
),
])
boolean_options
.
extend
([
...
...
@@ -128,6 +126,19 @@ class build_ext(_build_ext.build_ext):
self
.
cython_gdb
=
False
self
.
no_c_in_traceback
=
0
self
.
cython_compile_time_env
=
None
def
__getattr__
(
self
,
name
):
if
name
[:
6
]
==
'pyrex_'
:
return
getattr
(
self
,
'cython_'
+
name
[
6
:])
else
:
return
_build_ext
.
build_ext
.
__getattr__
(
self
,
name
)
def
__setattr__
(
self
,
name
,
value
):
if
name
[:
6
]
==
'pyrex_'
:
return
setattr
(
self
,
'cython_'
+
name
[
6
:],
value
)
else
:
# _build_ext.build_ext.__setattr__(self, name, value)
self
.
__dict__
[
name
]
=
value
def
finalize_options
(
self
):
_build_ext
.
build_ext
.
finalize_options
(
self
)
...
...
Cython/Distutils/extension.py
View file @
50bd1a47
...
...
@@ -40,7 +40,7 @@ class Extension(_Extension.Extension):
# When adding arguments to this constructor, be sure to update
# user_options.extend in build_ext.py.
def
__init__
(
self
,
name
,
sources
,
def
__init__
(
self
,
name
,
sources
,
include_dirs
=
None
,
define_macros
=
None
,
undef_macros
=
None
,
...
...
@@ -65,6 +65,31 @@ class Extension(_Extension.Extension):
no_c_in_traceback
=
False
,
cython_compile_time_env
=
None
,
**
kw
):
# Translate pyrex_X to cython_X for backwards compatibility.
had_pyrex_options
=
False
for
key
in
kw
.
keys
():
if
key
.
startswith
(
'pyrex_'
):
had_pyrex_options
=
True
kw
[
'cython'
+
key
[
5
:]]
=
kw
.
pop
(
key
)
if
had_pyrex_options
:
Extension
.
__init__
(
self
,
name
,
sources
,
include_dirs
=
include_dirs
,
define_macros
=
define_macros
,
undef_macros
=
undef_macros
,
library_dirs
=
library_dirs
,
libraries
=
libraries
,
runtime_library_dirs
=
runtime_library_dirs
,
extra_objects
=
extra_objects
,
extra_compile_args
=
extra_compile_args
,
extra_link_args
=
extra_link_args
,
export_symbols
=
export_symbols
,
#swig_opts = swig_opts,
depends
=
depends
,
language
=
language
,
no_c_in_traceback
=
no_c_in_traceback
,
**
kw
)
return
_Extension
.
Extension
.
__init__
(
self
,
name
,
sources
,
include_dirs
=
include_dirs
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment