maiself / godot-python-extension

Python language bindings for the Godot game engine
https://godot-python-extension.readthedocs.io
MIT License
18 stars 3 forks source link

Build fails on Windows during `prepare_for_platform()`, missing `strip` program #4

Open zack-luan opened 3 months ago

zack-luan commented 3 months ago

In the prepare_for_platform() function of the tools/build/prepare_python.py file, the scons were interrupted due to the lack of the strip command in Windows:

subprocess.run(['strip', '-s', str(dest_dir / pathlib.Path(config.so_path).name)], check=True)

I made some modifications:

if not sys.platform == 'win32':
    subprocess.run(['strip', '-s', str(dest_dir / pathlib.Path(config.so_path).name)], check=True)

But other platforms have not been tested, hoping for improvement。

maiself commented 3 months ago

I don't actually have access to a Windows system, so I can only test by cross compiling from Linux or by using GitHub actions.

The GitHub action builds complete just fine, so I'm not sure what to make of this. I understand strip is a Unix style program, but if GitHub actions has it available perhaps there's something missing in your config?

What's the expected equivalent in the Windows world? I'm not all that familiar with that platform, so any insight you can share would help out a lot.

zack-luan commented 3 months ago

I plan to re-implement Python scripting using C++ modules. During the implementation process, I will leverage the code you have already implemented. I will share the progress with you once there are any developments.

maiself commented 3 months ago

Implementing Python scripting using C++ directly is not a small undertaking and comes with many caveats (which I've unfortunately not had time to document). I'm curious as to what parts exactly you intend to implement and your thinking in doing so is? My intent in the design of this project was to quickly and minimally offload as much as possible from C++ to pure Python so that ease, flexible and rapid development could follow. Is the current approach lacking somehow?

I'm very glad you will make use of my code! I'd very much like if the various Python binding efforts could somehow join and consolidate, it's such a big project, if we can all help each other I'm sure the result will be great!

Please do share any progress or ask questions. There is a (currently empty) discussion forum here, and you may also contact me in private if you desire (email in git logs).

I feel a little bad about the current situation. I had wanted a few months ago to finish some things and get this project a proper release, but I simply haven't had the time. This past week I actually pulled out some notes and began looking at things, so I seam to have a little more time to spare recently. We'll see 😊

Let's keep each other updated on our progress, I look forward to hearing from you soon!