Issue 1467

This commit is contained in:
Thomas Nagy 2015-02-12 00:13:18 +01:00
parent e1acde1bfb
commit ad5a6cb0e4
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 12 additions and 3 deletions

View File

@ -1,12 +1,12 @@
#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2010
# Thomas Nagy, 2010-2015
import re
import os,re
import waflib
import waflib.Logs as _msg
from waflib import Task
from waflib import Task, Logs
from waflib.TaskGen import extension, feature, before_method, after_method
cy_api_pat = re.compile(r'\s*?cdef\s*?(public|api)\w*')
@ -68,6 +68,15 @@ class cython(Task.Task):
self.outputs.append(self.inputs[0].parent.find_or_declare(x.replace('header:', '')))
return super(cython, self).runnable_status()
def post_run(self):
for x in self.outputs:
if x.name.endswith('.h'):
if not os.path.exists(x.abspath()):
if Logs.verbose:
Logs.warn('Expected %r' % x.abspath())
x.write('')
return Task.Task.post_run(self)
def scan(self):
"""
Return the dependent files (.pxd) by looking in the include folders.