colcon / colcon-core

Command line tool to build sets of software packages
http://colcon.readthedocs.io
Apache License 2.0
103 stars 46 forks source link

Question: how to pass python parameters #557

Closed felixf4xu closed 1 year ago

felixf4xu commented 1 year ago

Hi,

When I build a package, it has a warning like

DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

I would like to hide it by python -W ignore::DeprecationWarning, so how can I pass -W ignore::DeprecationWarning to python via colcon?

cottsay commented 1 year ago

I don't think colcon currently supports passing additional parameters to the build tool.

For warnings specifically, you should check out the PYTHONWARNINGS environment variable.