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
Kirill Smelkov
cython
Commits
f0418979
Commit
f0418979
authored
Sep 10, 2016
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to fix build in Py3.2
parent
849d829a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
setup.py
setup.py
+9
-1
No files found.
setup.py
View file @
f0418979
...
@@ -190,7 +190,9 @@ def _defer_cython_import_in_py32(build_ext_orig, source_root, profile=False):
...
@@ -190,7 +190,9 @@ def _defer_cython_import_in_py32(build_ext_orig, source_root, profile=False):
# sys.modules
# sys.modules
dead_modules
=
[]
dead_modules
=
[]
def
build_extensions
(
self
):
def
__reimport
(
self
):
if
self
.
dead_modules
:
return
# add path where 2to3 installed the transformed sources
# add path where 2to3 installed the transformed sources
# and make sure Python (re-)imports them from there
# and make sure Python (re-)imports them from there
already_imported
=
[
already_imported
=
[
...
@@ -203,6 +205,12 @@ def _defer_cython_import_in_py32(build_ext_orig, source_root, profile=False):
...
@@ -203,6 +205,12 @@ def _defer_cython_import_in_py32(build_ext_orig, source_root, profile=False):
del
sys
.
modules
[
module
]
del
sys
.
modules
[
module
]
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
source_root
,
self
.
build_lib
))
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
source_root
,
self
.
build_lib
))
def
finalize_options
(
self
):
self
.
__reimport
()
super
(
build_ext
,
self
).
finalize_options
()
def
build_extensions
(
self
):
self
.
__reimport
()
if
profile
:
if
profile
:
from
Cython.Compiler.Options
import
directive_defaults
from
Cython.Compiler.Options
import
directive_defaults
directive_defaults
[
'profile'
]
=
True
directive_defaults
[
'profile'
]
=
True
...
...
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