hello-robot / stretch_body

Python packages to interact with the hardware of the Stretch mobile manipulators from Hello Robot Inc.
https://docs.hello-robot.com/0.2/stretch-tutorials/stretch_body/
26 stars 25 forks source link

Sys check should ensure setuptool-scm not installed #295

Open hello-binit opened 6 months ago

hello-binit commented 6 months ago

The stretch_system_check.py tool knows which packages should and shouldn't be installed. It checks this at the Apt/ROS level and prints out a warning to user if a package is installed that shouldn't be or vice versa.

Now, at the Python level, we have a library that shouldn't be installed: setuptools-scm. When this library is installed, the following errors are emitted from colcon build:

/home/hello-robot/.local/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py:30: RuntimeWarning: 
ERROR: setuptools==59.6.0 is used in combination with setuptools_scm>=8.x

Your build configuration is incomplete and previously worked by accident!
setuptools_scm requires setuptools>=61

Suggested workaround if applicable:
 - migrating from the deprecated setup_requires mechanism to pep517/518
   and using a pyproject.toml to declare build dependencies
   which are reliably pre-installed before running the build tools

  warnings.warn(
[02/28/24 12:58:15] ERROR    listing git files failed - pretending there aren't any 

setuptools-scm has no function within our codebase and can be safety uninstalled. But it seems to be a dependency of one of the packages we do depend on, so it keeps returning. Therefore, sys check should emit a warning when it detects this library and provide a quick command to uninstall it.

hello-binit commented 6 months ago

Seems it's getting installed when upgrading stretch body because of matplotlib.

Collecting setuptools-scm>=4 (from matplotlib<=3.5.0->hello-robot-stretch-body)
  Using cached setuptools_scm-8.0.4-py3-none-any.whl.metadata (6.4 kB)