Running Python Script as Build Command

I am trying to run a Python script as my build command: 

python ${ProjDirPath}/make_wrapper.py

From within my Python script, I call the make with the two arguments:

    make_command = f"make {JOBS} {FUNCTION}"
    subprocess.run(make_command, shell=True, cwd=os.getcwd())
I am getting the following errors when I do this:
"python C:\\xxx\\xxx\\xxx\\xxx\\make_wrapper.py" -j12 all
Cannot run program "python C:\xxx\xxx\xxx\xxx\make_wrapper.py": Launching failed

Error: Program "python C:\xxx\xxx\xxx\xxx\make_wrapper.py" not found in PATH

However, I have a post-build command that I use in the same fashion that runs without issue. This is the command for that:
python ${ProjDirPath}/post_build.py ${ProjName} Debug
Any thoughts would be appreciated.
Parents Reply Children
No data