Python scripts in custom build steps

Sysprogs forums Forums VisualGDB Python scripts in custom build steps

This topic contains 1 reply, has 2 voices, and was last updated by  support 3 weeks, 5 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #29710



    I am trying to call a python script before a build the firmware.
    First I tried the following command:
    python.exe “$(DOCUMENTS_ROOT)\Firmware\Scripts\”

    But it only works if I write the full path to python.exe, e.g.
    C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe …

    This is bad for portability, since a other developer may use a different python installation.
    The full path is set within the environment variable PATH and cmd.exe can execute it.
    Are there anything left I have to consider?




    Please try using the $() syntax with environment variables (e.g. $(ProgramFiles) or simply define your own variable).

    Also VisualGDB will automatically install Python to $(LOCALAPPDATA)\VisualGDB\Python if you create a project using mbed, esp-idf or nRFConnect, so you can try referencing that Python installation instead.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.