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:
97995d6
)
fix for Py<=2.5
author
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 10 Aug 2013 14:01:36 +0000
(16:01 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 10 Aug 2013 14:01:36 +0000
(16:01 +0200)
Cython/Build/Dependencies.py
patch
|
blob
|
history
diff --git
a/Cython/Build/Dependencies.py
b/Cython/Build/Dependencies.py
index
d718504
..
eb8ba11
100644
(file)
--- a/
Cython/Build/Dependencies.py
+++ b/
Cython/Build/Dependencies.py
@@
-768,10
+768,13
@@
def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
if not os.path.exists(c_file):
failed_modules.update(modules)
elif os.path.getsize(c_file) < 200:
- with io_open(c_file, 'r', encoding='iso8859-1') as f:
+ f = io_open(c_file, 'r', encoding='iso8859-1')
+ try:
if f.read(len('#error ')) == '#error ':
# dead compilation result
failed_modules.update(modules)
+ finally:
+ f.close()
if failed_modules:
for module in failed_modules:
module_list.remove(module)