parent
d95a108503
commit
a8120eb519
7 changed files with 38 additions and 0 deletions
@ -0,0 +1,2 @@ |
||||
def gluoninate(): |
||||
return 42 |
@ -0,0 +1,9 @@ |
||||
project('python sample', 'c') |
||||
|
||||
py3 = find_program('python3') |
||||
|
||||
main = files('prog.py') |
||||
|
||||
test('toplevel', py3, args : main) |
||||
|
||||
subdir('subdir') |
@ -0,0 +1,9 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
from gluon import gluonator |
||||
import sys |
||||
|
||||
print('Running mainprog from root dir.') |
||||
|
||||
if gluonator.gluoninate() != 42: |
||||
sys.exit(1) |
@ -0,0 +1,5 @@ |
||||
submain = find_program('subprog.py') |
||||
|
||||
test('subdir', |
||||
submain, |
||||
env : 'PYTHONPATH=' + meson.source_root()) |
@ -0,0 +1,12 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
# In order to run this program, PYTHONPATH must be set to |
||||
# point to source root. |
||||
|
||||
from gluon import gluonator |
||||
import sys |
||||
|
||||
print('Running mainprog from subdir.') |
||||
|
||||
if gluonator.gluoninate() != 42: |
||||
sys.exit(1) |
Loading…
Reference in new issue