Skip to content

Commit

Permalink
make it possible to specify PYTHON_INTERPRETER for build (needed for …
Browse files Browse the repository at this point in the history
…MinGW)
  • Loading branch information
firewave committed Feb 12, 2022
1 parent 691b5e6 commit 61d7e5a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -20,7 +20,9 @@ ifeq ($(SRCDIR),build)
endif
ifeq ($(MATCHCOMPILER),yes)
# Find available Python interpreter
PYTHON_INTERPRETER := $(shell which python3)
ifndef PYTHON_INTERPRETER
PYTHON_INTERPRETER := $(shell which python3)
endif
ifndef PYTHON_INTERPRETER
PYTHON_INTERPRETER := $(shell which python)
endif
Expand Down
10 changes: 10 additions & 0 deletions readme.md
Expand Up @@ -207,6 +207,16 @@ g++ -o cppcheck -std=c++11 -lpcre -DHAVE_RULES -Ilib -Iexternals -Iexternals/sim
mingw32-make
```

If you encounter the following error with `MATCHCOMPILER=yes` you need to specify your Python interpreter via `PYTHON_INTERPRETER`.

```
process_begin: CreateProcess(NULL, which python3, ...) failed.
makefile:24: pipe: No error
process_begin: CreateProcess(NULL, which python, ...) failed.
makefile:27: pipe: No error
makefile:30: *** Did not find a Python interpreter. Stop.
```

### Other Compiler/IDE

1. Create an empty project file / makefile.
Expand Down
4 changes: 3 additions & 1 deletion tools/dmake.cpp
Expand Up @@ -254,7 +254,9 @@ int main(int argc, char **argv)
<< "endif\n";
fout << "ifeq ($(MATCHCOMPILER),yes)\n"
<< " # Find available Python interpreter\n"
<< " PYTHON_INTERPRETER := $(shell which python3)\n"
<< " ifndef PYTHON_INTERPRETER\n"
<< " PYTHON_INTERPRETER := $(shell which python3)\n"
<< " endif\n"
<< " ifndef PYTHON_INTERPRETER\n"
<< " PYTHON_INTERPRETER := $(shell which python)\n"
<< " endif\n"
Expand Down

0 comments on commit 61d7e5a

Please sign in to comment.