summaryrefslogtreecommitdiff
path: root/third_party/waf/waflib/extras/cython.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/waf/waflib/extras/cython.py')
-rw-r--r--third_party/waf/waflib/extras/cython.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/third_party/waf/waflib/extras/cython.py b/third_party/waf/waflib/extras/cython.py
index 26d1c6f147c..20e94d051d8 100644
--- a/third_party/waf/waflib/extras/cython.py
+++ b/third_party/waf/waflib/extras/cython.py
@@ -1,8 +1,12 @@
#! /usr/bin/env python
# encoding: utf-8
+# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
+
+#! /usr/bin/env python
+# encoding: utf-8
# Thomas Nagy, 2010-2015
-import os, re
+import re
from waflib import Task, Logs
from waflib.TaskGen import extension
@@ -68,9 +72,9 @@ class cython(Task.Task):
def post_run(self):
for x in self.outputs:
if x.name.endswith('.h'):
- if not os.path.exists(x.abspath()):
+ if not x.exists():
if Logs.verbose:
- Logs.warn('Expected %r' % x.abspath())
+ Logs.warn('Expected %r', x.abspath())
x.write('')
return Task.Task.post_run(self)
@@ -92,7 +96,7 @@ class cython(Task.Task):
else:
mods.append(m.group(2))
- Logs.debug("cython: mods %r" % mods)
+ Logs.debug('cython: mods %r', mods)
incs = getattr(self.generator, 'cython_includes', [])
incs = [self.generator.path.find_dir(x) for x in incs]
incs.append(node.parent)
@@ -113,7 +117,7 @@ class cython(Task.Task):
if implicit:
found.append(implicit)
- Logs.debug("cython: found %r" % found)
+ Logs.debug('cython: found %r', found)
# Now the .h created - store them in bld.raw_deps for later use
has_api = False
@@ -143,3 +147,4 @@ def configure(ctx):
ctx.find_program('cython', var='CYTHON')
if ctx.options.cython_flags:
ctx.env.CYTHONFLAGS = ctx.options.cython_flags
+