robotpy / robotpy-build

(mostly) automated C++ wrapping for Python
BSD 3-Clause "New" or "Revised" License
35 stars 16 forks source link

Provide for Apple Silicon (ARM64) platform as well #197

Closed zacbir closed 1 year ago

zacbir commented 1 year ago

This wheel fails to build on Apple Silicon (M1, M2, &c). This branch provides for it.

Not sure about provisioning arm64 test runners in the GitHub workflows.

virtuald commented 1 year ago

Just curious, which wheel are you trying to build? We publish wheels for all robotpy components, so you shouldn't need to compile it yourself (unless you are explicitly trying to do that).

zacbir commented 1 year ago

Just curious, which wheel are you trying to build? We publish wheels for all robotpy components, so you shouldn't need to compile it yourself (unless you are explicitly trying to do that).

I was trying to pip install robotpy-romi and got this:

$ pip install robotpy-romi
Collecting robotpy-romi
  Downloading robotpy-romi-2022.2.1.0.tar.gz (7.9 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [83 lines of output]
      Collecting robotpy-build<2023.0.0,>=2022.2.0
        Downloading robotpy_build-2022.2.2-py3-none-any.whl (259 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 259.4/259.4 kB 4.6 MB/s eta 0:00:00
      Collecting wpilib<2023.0.0,>=2022.2.1.3
        Downloading wpilib-2022.4.1.6.tar.gz (63 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.5/63.5 kB 4.3 MB/s eta 0:00:00
        Installing build dependencies: started
        Installing build dependencies: finished with status 'error'
        error: subprocess-exited-with-error

        × pip subprocess to install build dependencies did not run successfully.
        │ exit code: 1
        ╰─> [60 lines of output]
            Collecting robotpy-build<2023.0.0,>=2022.2.0
              Using cached robotpy_build-2022.2.2-py3-none-any.whl (259 kB)
            Collecting robotpy-wpiutil<2023.0.0,>=2022.4.1.1
              Downloading robotpy-wpiutil-2022.4.1.2.tar.gz (17 kB)
              Installing build dependencies: started
              Installing build dependencies: finished with status 'done'
              Getting requirements to build wheel: started
              Getting requirements to build wheel: finished with status 'error'
              error: subprocess-exited-with-error

              × Getting requirements to build wheel did not run successfully.
              │ exit code: 1
              ╰─> [37 lines of output]
                  Traceback (most recent call last):
                    File "/private/var/folders/bh/9dp5r_6s3kg4xpc7rylrg9lw0000gn/T/pip-build-env-5e22aj9r/overlay/lib/python3.11/site-packages/robotpy_build/platforms.py", line 85, in get_platform
                      return _platforms[name]
                             ~~~~~~~~~~^^^^^^
                  KeyError: 'macosx-11.0-arm64'

                  During handling of the above exception, another exception occurred:

                  Traceback (most recent call last):
                    File "/Users/zbir/Dev/FRC-23/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                      main()
                    File "/Users/zbir/Dev/FRC-23/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                      json_out['return_val'] = hook(**hook_input['kwargs'])
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    File "/Users/zbir/Dev/FRC-23/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
                      return hook(config_settings)
                             ^^^^^^^^^^^^^^^^^^^^^
                    File "/private/var/folders/bh/9dp5r_6s3kg4xpc7rylrg9lw0000gn/T/pip-build-env-5e22aj9r/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
                      return self._get_build_requires(config_settings, requirements=['wheel'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    File "/private/var/folders/bh/9dp5r_6s3kg4xpc7rylrg9lw0000gn/T/pip-build-env-5e22aj9r/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
                      self.run_setup()
                    File "/private/var/folders/bh/9dp5r_6s3kg4xpc7rylrg9lw0000gn/T/pip-build-env-5e22aj9r/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 485, in run_setup
                      self).run_setup(setup_script=setup_script)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    File "/private/var/folders/bh/9dp5r_6s3kg4xpc7rylrg9lw0000gn/T/pip-build-env-5e22aj9r/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 335, in run_setup
                      exec(code, locals())
                    File "<string>", line 5, in <module>
                    File "/private/var/folders/bh/9dp5r_6s3kg4xpc7rylrg9lw0000gn/T/pip-build-env-5e22aj9r/overlay/lib/python3.11/site-packages/robotpy_build/setup.py", line 212, in setup
                      s = Setup()
                          ^^^^^^^
                    File "/private/var/folders/bh/9dp5r_6s3kg4xpc7rylrg9lw0000gn/T/pip-build-env-5e22aj9r/overlay/lib/python3.11/site-packages/robotpy_build/setup.py", line 46, in __init__
                      self.platform = get_platform()
                                      ^^^^^^^^^^^^^^
                    File "/private/var/folders/bh/9dp5r_6s3kg4xpc7rylrg9lw0000gn/T/pip-build-env-5e22aj9r/overlay/lib/python3.11/site-packages/robotpy_build/platforms.py", line 87, in get_platform
                      raise KeyError(f"platform {name} is not supported by robotpy-build!")
                  KeyError: 'platform macosx-11.0-arm64 is not supported by robotpy-build!'
                  [end of output]

              note: This error originates from a subprocess, and is likely not a problem with pip.
            error: subprocess-exited-with-error

            × Getting requirements to build wheel did not run successfully.
            │ exit code: 1
            ╰─> See above for output.

            note: This error originates from a subprocess, and is likely not a problem with pip.
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: subprocess-exited-with-error

      × pip subprocess to install build dependencies did not run successfully.
      │ exit code: 1
      ╰─> See above for output.

      note: This error originates from a subprocess, and is likely not a problem with pip.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
zacbir commented 1 year ago

Also, I see that it's pulling the 2022 versions, is there anything I can do to help move the project forward to the 2023 WPILib codebase?

virtuald commented 1 year ago

The romi vendordep hasn't been updated for 2023, so that would be why we haven't pushed an update (see https://frcmaven.wpi.edu/ui/native/release/edu/wpi/first/romi/romi-vendordep-cpp/).

zacbir commented 1 year ago

Gotcha. New to all this. Mentoring at my son’s high school and I’m trying to nudge them towards RobotPy at least for next year.On Feb 5, 2023, at 10:33 AM, Dustin Spicuzza @.***> wrote: The romi vendordep hasn't been updated for 2023, so that would be why we haven't pushed an update (see https://frcmaven.wpi.edu/ui/native/release/edu/wpi/first/romi/romi-vendordep-cpp/).

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>