Commit 6ded60ab authored by Stefan Behnel's avatar Stefan Behnel

prevent Py3.x build from picking up outdated sources from a previous 2to3 run

parent 1ca9b8dc
......@@ -175,10 +175,13 @@ def compile_cython_modules(profile=False, compile_more=False, cython_with_refnan
dead_modules = []
def build_extensions(self):
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.') ]
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])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment