projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f9fb5f
)
fix 'cimport cython' in string code fragments
author
Stefan Behnel
<stefan_ml@behnel.de>
Wed, 28 Nov 2012 20:15:28 +0000
(21:15 +0100)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Wed, 28 Nov 2012 20:15:28 +0000
(21:15 +0100)
Cython/Compiler/TreeFragment.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/TreeFragment.py
b/Cython/Compiler/TreeFragment.py
index
29ff12d
..
9832959
100644
(file)
--- a/
Cython/Compiler/TreeFragment.py
+++ b/
Cython/Compiler/TreeFragment.py
@@
-26,7
+26,7
@@
class StringParseContext(Main.Context):
self.module_name = name
def find_module(self, module_name, relative_to = None, pos = None, need_pxd = 1):
- if module_name
!= self.module_name
:
+ if module_name
not in (self.module_name, 'cython')
:
raise AssertionError("Not yet supporting any cimports/includes from string code snippets")
return ModuleScope(module_name, parent_module = None, context = self)