Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the state of platform and architecture support #22

Open
Ivorforce opened this issue Oct 23, 2024 · 2 comments · May be fixed by #33
Open

Document the state of platform and architecture support #22

Ivorforce opened this issue Oct 23, 2024 · 2 comments · May be fixed by #33
Labels
build related to the build system documentation Improvements or additions to documentation

Comments

@Ivorforce
Copy link
Contributor

Just now looking through prepare_python.py, i think it implies this extension has only windows and linux x64 support.

We need to document that the other platforms are missing (if that's the case). Here's the common platforms as taken from godot-cpp:

          - platform: linux
            arch: x86_64
          - platform: windows
            arch: x86_32
          - platform: windows
            arch: x86_64
          - platform: macos
            arch: universal
          - platform: android
            arch: arm64
          - platform: android
            arch: arm32
          - platform: android
            arch: x86_64
          - platform: android
            arch: x86_32
          - platform: ios
            arch: arm64
          - platform: web
            arch: wasm32

To re-iterate: This issue is not here to call to support these arches, it's here to document existing support. We can have separate issues for adding support for other platforms elsewhere.

@maiself
Copy link
Owner

maiself commented Oct 24, 2024

You are correct that only Linux and Windows on x86_64 are currently supported. My original desire was to support the following:

currently supported:
  • platform: linux
    arch: x86_64

  • platform: windows
    arch: x86_64

have experience with platform:
  • platform: android
    arch: arm64

  • platform: web
    arch: wasm32

no experience or means to work with platform:
  • platform: macos
    arch: universal

  • platform: ios
    arch: arm64

Other platforms / architectures could certainly be supported, but I figured this was a good base set.

Currently python-build-standalone is used to provide the prebuilt bundled Python, but I don't think that that project has Android builds available. iOS is available according to the docs? Web may need a custom build process, and I wonder if all platforms should built directly by this project, or if would be better for contributions to be made to the build system of the other project.

I haven't had time to tackle Android and Web, and I personally wont be able to do anything with Apple platforms (tho it looks like you've started on that, thank you 😃)

One think to keep in mind when attempting to get a platform working is dynamic loading. This varies a bit from platform to platform, I and think we should support as much as possible in this regard, ie: dynamic loading of Python itself, dynamic loading of any Python extension modules, and further any shared libraries that may be loaded by extension modules. This is currently working for Linux and Windows.

@maiself maiself added documentation Improvements or additions to documentation build related to the build system labels Oct 24, 2024
@Ivorforce
Copy link
Contributor Author

Thank you for the information! We should probably get that into the readme and / or docs.

Regarding the dynamic loading, that's valuable info. I'll have to look into that on macOS when I start testing the binary for real.

I'm not sure how well web or deployments in general will work out of the box. I've had immense trouble with Python with that in the past. A recent project of mine involved deploying a Dash app as a standalone .app (solved here) and the most reliable way I could get it is with Nuitka which is sorta similar to Cython. I've been told Nuitka is easier to get working than Cython, but I ran into quite a lot of trouble i had to address nonetheless.

It's possible that the nature of this project makes things a bit simpler, but that's the state of Python that I remember w.r.t. portability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build related to the build system documentation Improvements or additions to documentation
Projects
None yet
2 participants