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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
6ded60ab
Commit
6ded60ab
authored
Oct 01, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent Py3.x build from picking up outdated sources from a previous 2to3 run
parent
1ca9b8dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
setup.py
setup.py
+12
-9
No files found.
setup.py
View file @
6ded60ab
...
...
@@ -175,15 +175,18 @@ def compile_cython_modules(profile=False, compile_more=False, cython_with_refnan
dead_modules
=
[]
def
build_extensions
(
self
):
# add path where 2to3 installed the transformed sources
# and make sure Python (re-)imports them from there
already_imported
=
[
module
for
module
in
sys
.
modules
if
module
==
'Cython'
or
module
.
startswith
(
'Cython.'
)
]
keep_alive
=
self
.
dead_modules
.
append
for
module
in
already_imported
:
keep_alive
(
sys
.
modules
[
module
])
del
sys
.
modules
[
module
]
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
source_root
,
self
.
build_lib
))
if
sys
.
version_info
[:
2
]
==
(
3
,
2
):
# add path where 2to3 installed the transformed sources
# and make sure Python (re-)imports them from there
already_imported
=
[
module
for
module
in
sys
.
modules
if
module
==
'Cython'
or
module
.
startswith
(
'Cython.'
)
]
keep_alive
=
self
.
dead_modules
.
append
for
module
in
already_imported
:
keep_alive
(
sys
.
modules
[
module
])
del
sys
.
modules
[
module
]
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
source_root
,
self
.
build_lib
))
if
profile
:
from
Cython.Compiler.Options
import
directive_defaults
...
...
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