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

Avoid distutils-related build time spam on Python 3.11 #1194

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from

Conversation

mikepurvis
Copy link
Member

Without this change, Python 3.11 platforms get this on every build— not just of catkin itself, but every package that uses it:

/home/mikepurvis/roslib_ws/install/share/catkin/cmake/interrogate_setup_dot_py.py:43: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils.core

This has been discussed previously in #1164 (comment), but I'm hopeful that this change will resolve the issue for Python 3.11+ users while allowing any remaining distutils packages to continue functioning.

Note that this does not address the other deprecation warning related to catkin invoking setup.py directly. There was some discussion of that in #1162, but it will definitely be a separate PR, attempting to move cmake/templates/python_distutils_install.sh.in to a pypi/build workflow.

@mikepurvis
Copy link
Member Author

Building our larger workspace with this change has revealed that it definitely still breaks with ROS Python packages using distutils— I'll modify the patch to conditionally import distutils in the case where the package's setup.py actually uses it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant