This is a follow-up to gh-8706, which contained the initial fix to ninjabackend.py but somehow lost it. This re-applies the fix and adds a test for it. Without the fix, the error is: ninja: error: 'ct2.pyx', needed by 'libdir/ct2.cpython-39-x86_64-linux-gnu.so.p/ct2.pyx.c', missing and no known rule to make itpull/8883/head
parent
fc93c07e9e
commit
bc6df45663
4 changed files with 35 additions and 0 deletions
@ -0,0 +1,14 @@ |
||||
# SPDX-License-Identifier: Apache-2.0 |
||||
|
||||
import argparse |
||||
import textwrap |
||||
|
||||
parser = argparse.ArgumentParser() |
||||
parser.add_argument('output') |
||||
args = parser.parse_args() |
||||
|
||||
with open(args.output, 'w') as f: |
||||
f.write(textwrap.dedent('''\ |
||||
cpdef func(): |
||||
return "Hello, World!" |
||||
''')) |
@ -0,0 +1,10 @@ |
||||
ct2 = custom_target( |
||||
'ct2', |
||||
input : 'gen.py', |
||||
output : 'ct2.pyx', |
||||
command : [py3, '@INPUT@', '@OUTPUT@'], |
||||
) |
||||
|
||||
ct2_ext = py3.extension_module('ct2', ct2, dependencies : py3_dep) |
||||
|
||||
pydir = meson.current_build_dir() |
Loading…
Reference in new issue