ros-tooling / setup-ros

Github Action to set up ROS 2 on hosts
Apache License 2.0
85 stars 38 forks source link

fix: modify macos ci #675

Closed wep21 closed 2 months ago

wep21 commented 2 months ago

This PR fixes:

- ModuleNotFoundError: No module named 'distutils'
- note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
  hint: See PEP 668 for the detailed specification.

It also pins Python to 3.10 as per REP 2000: https://www.ros.org/reps/rep-2000.html#rolling-ridley-june-2020-ongoing

christophebedard commented 2 months ago

It's still using the system Python 3.12 even though we're installing 3.10: https://github.com/ros-tooling/setup-ros/actions/runs/8881922426/job/24385408636?pr=675#step:5:1251. Some possible solutions:

  1. Uninstall 3.12?
  2. Change PATH to point to the 3.10 installation: https://apple.stackexchange.com/a/450306. However, we'd need to do that in action-ros-ci too, so that's a bit annoying.
  3. Change the system python/python3 executables to point to python3.10.
christophebedard commented 2 months ago

Looks like it still has some Python 3.12 stuff: https://github.com/ros-tooling/setup-ros/actions/runs/8882209200/job/24386325507?pr=675#step:5:1274.

I'm guessing /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ is the system installation.

christophebedard commented 2 months ago

I just want to confirm that you're happy with this. CI passes and I don't see any references to the system python3.12 anymore.

wep21 commented 2 months ago

The changes are

wep21 commented 2 months ago

For now, it is unnecessary to make break-system-package true because it is necessary for python3.12. @christophebedard Do you think the change should remain?

christophebedard commented 2 months ago

I think it's fine, we can leave it there.

christophebedard commented 2 months ago

I released this as 0.7.4/v0.7.