Re: Problem building mm-common on MSYS2



On 15/04/2021 01:24, Oliver Niebuhr wrote:

I do not know if this is the Solution but I added 'sys.executable' and the Error Message went away:

result = subprocess.run([sys.executable, 'aclocal', '--print-ac-dir'],
                          stdout=subprocess.PIPE, stderr=subprocess.DEVNULL,
                          universal_newlines=True)

That's highly unlikely to be a solution, nor even of much interest. What that is doing is to invoke another instance of Python and pass "aclocal" as its first argument. The error goes away because sys.executable is (where non-blank) an absolute path not reliant on the environment. I don't expect aclocal to actually work if invoked as a Python script!

I still think this is down to (the Windows sub-shell invoked by Python) not having aclocal in the search path. Note that the shell environment on Windows10 is NOT RELIABLE. It doesn't get inherited the way it does on real operating systems. And you're running MSYS, which means you actually have high probability that what you're running from within a Python script isn't even the same *type* of shell that you use when you type the command directly.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]