Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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
  • 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}/make_wrapper.py"

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

Reply
  • 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}/make_wrapper.py"

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

Children
No data