| 1 |
project('python kwarg', |
| 2 |
default_options: [ |
| 3 |
'python.bytecompile=-1', |
| 4 |
'python.purelibdir=/pure', |
| 5 |
] |
| 6 |
) |
| 7 |
|
| 8 |
py = import('python') |
| 9 |
prog_python = py.find_installation('python3', modules : ['os', 'sys', 're'], pure: true) |
| 10 |
assert(prog_python.found() == true, 'python not found when should be') |
| 11 |
|
| 12 |
# In meson 1.2 - 1.3.2, there was a bug when a python installation |
| 13 |
# with a different version did not have a module, and we try to install |
| 14 |
# something with another python version... |
| 15 |
py.find_installation('python3.7', modules: ['notamodule'], required: false) |
| 16 |
prog_python.install_sources('a.py') |
| 17 |
|
| 18 |
prog_python = py.find_installation('python3', modules : ['thisbetternotexistmod'], required : false) |
| 19 |
assert(prog_python.found() == false, 'python not found but reported as found') |