Running Python Script as Build Command

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

python ${ProjDirPath}/

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

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

Error: Program "python C:\xxx\xxx\xxx\xxx\" 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}/ ${ProjName} Debug
Any thoughts would be appreciated.
  • To provide more background: I am trying to use a script type that works on both Windows and Linux. It works fine on Windows with a .bat substituted for the .py file.

    The issue seems to be that the IDE is treating "python" as the executable and the "" as an argument instead of executing the .py file using the Python interpreter. 

  • Got it working.

    Set the Build Command to just "python" under Builder Settings

    Under Behavior, select Use custom build arguments and then set Build arguments to "${ProjDirPath}/"

    and then for my Build (Incremental build) I set to "-j12 all", same thing for clean