Skip to content

CMakeList and scan_enums update to python3 - #6217

Merged
impaktor merged 1 commit into
pioneerspacesim:masterfrom
fluffyfreak:cmake-python3
Oct 28, 2025
Merged

impaktor merged 1 commit into
pioneerspacesim:masterfrom
fluffyfreak:cmake-python3

Conversation

@fluffyfreak

Copy link
Copy Markdown
Contributor

When trying to build Pioneer on the latest Raspberry Pi OS "Trixie" it ran into issues with the scan_enums.py requiring Python2 which now appears to be so deprecated it cannot be recovered at all.

So I've tried updating it to Python3 in both CMakeLists.txt and the scan_enums.py script. This seems to work with only minimal changes and resolves the issues around Python2 deprecation. It successfully generates:

modified: data/meta/Constants.lua
modified: src/enum_table.cpp
modified: src/enum_table.h

I have not included those modified files here.

@mwerle mwerle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested specifically but code compiles and runs.

Apart from a minor nitpick LGTM.

Comment thread scripts/scan_enums.py Outdated
@impaktor

Copy link
Copy Markdown
Member

Looks like running it adds Geoshpere & Gunmanager related constants.

@impaktor
impaktor merged commit 430ffc3 into pioneerspacesim:master Oct 28, 2025
4 checks passed
@impaktor

Copy link
Copy Markdown
Member

Squashed, force-pushed & rebased to master.
Thanks for PR

@fluffyfreak
fluffyfreak deleted the cmake-python3 branch October 28, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants