Meson: Provide a meson.bat for Windows users

Created on 11 Mar 2018  路  5Comments  路  Source: mesonbuild/meson

meson 0.45.0 install with pip3 on Windows 10 (Python 3.6.2 )

>python meson.py
Traceback (most recent call last):
File "meson.py", line 17, in
from mesonbuild import mesonmain, mesonlib
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\mesonmain.py", line 18, in
from . import environment, interpreter, mesonlib
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\environment.py", line 17, in
from . import coredata
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\coredata.py", line 20, in
from .mesonlib import MesonException
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\mesonlib.py", line 78, in
meson_command = python_command + [detect_meson_py_location()]
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\mesonlib.py", line 70, in detect_meson_py_location
raise RuntimeError('Could not determine how to run Meson. Please file a bug with details.')
RuntimeError: Could not determine how to run Meson. Please file a bug with details.

windows bug

Most helpful comment

You have to ensure that the py launcher is installed with your installation. I don't know if that happens by default.

I think we should consider shipping a meson.bat file that contains C:\path\to\python C:\path\to\meson.py %*, and put it in PATH. That will make it easier for users.

All 5 comments

On Windows you should not run pip installed binaries like that. Instead you should do meson <options>. I just tested this and it seems to work on Windows 10 and Python 3.6.4. Can you test that?

>pip3 install meson
Requirement already satisfied: meson in c:\users\xappdata\local\programs\python\python36\lib\site-packages
>meson
'meson' is not recognized as an internal or external command, operable program or batch file.
>meson.py
C:\Users\x\AppData\Local\Programs\Python\Python36\Scripts\meson.py \ If you omit either directory, the current directory is substituted.
Run C:\Users\x\AppData\Local\Programs\Python\Python36\Scripts\meson.py --help for more information.

You have to ensure that the py launcher is installed with your installation. I don't know if that happens by default.

I think we should consider shipping a meson.bat file that contains C:\path\to\python C:\path\to\meson.py %*, and put it in PATH. That will make it easier for users.

This is a duplicate of #1877.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

z33ky picture z33ky  路  5Comments

ignatenkobrain picture ignatenkobrain  路  4Comments

eyelash picture eyelash  路  4Comments

Ericson2314 picture Ericson2314  路  4Comments

robertsanseries picture robertsanseries  路  6Comments