pcbnew: expose build information to python interface

Bug #1815349 reported by Mitja Nemec
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Unknown

Bug Description

It would be really nice if build version and build settings were exposed to python interface. Two usecases are:
- an action plugin could support different versions of KiCad plugin or would at least be able to notify the user that certain KiCad version is required.
- an action plugin could check for build settings such as KICAD_SCRIPTING_WXPYTHON and would refrain from using wx or at least notify the user that it will not run.

Using:
Application: kicad
Version: (6.0.0-rc1-dev-1691-g44cb979e9), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Tags: python
Changed in kicad:
milestone: none → 6.0.0-rc1
importance: Undecided → Wishlist
tags: added: scripting
removed: wishlist
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

We could only provide the static build info. Some of the info used in the about dialog is generated at run time and requires a valid wxApp instance in order to run. Calling this from a script where no wxApp was present would fail. I looked at this and it will require factoring out the static info code from the run time info code before this can be implemented.

Changed in kicad:
status: New → Triaged
Revision history for this message
Mitja Nemec (mitjan) wrote :

For me, it would be enough to expose DIALOG_ABOUT::buildVersionInfoData( wxString& aMsg, bool aFormatHtml ) to python.

And I don't think that requiring wxApp instance is a big issue as there are also other methods exposed which require wxApp [1], but I might be wrong about this, and keep in mind that I am just a python action plugin developer so I have no insight into KiCad internals.

[1] https://code.launchpad.net/~andrei-pozolotin/kicad/+git/kicad/+merge/366082

tags: added: python
removed: scripting
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/2337

Changed in kicad:
status: Triaged → Expired
Changed in kicad:
importance: Wishlist → Unknown
status: Expired → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.