Hello, when I build this project from source, some warnings occurred.
Hers is the output of the command colcon build:
Starting >>> rqt_tf_tree
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: rqt_tf_tree
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
---
Finished <<< rqt_tf_tree [1.32s]
These warnings show the tests_require option is expired. But the python is the default package with ubuntu 22.04 and setuptools is installed by pip.
And then I use colcon test to test this project, there were also some warnings.
Here is the output about the command colcon test:
Starting >>> rqt_tf_tree
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: rqt_tf_tree
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
---
Finished <<< rqt_tf_tree [0.31s]
It seems like that there were no python testing programs to run and no result file pytest.xml was generated in build directory.
Then I tried to modify the setup.py file in package rqt_tf_tree and replaced the option tests_require with extras_require.
Finally it can be built and test correctly.
Here is the modified content in setpu.py file:
tests_require=['pytest'], # remove
extras_require={
'test': ['pytest'],
}, # add
Now the python and setuptools version are updated very quickly, could you tell me if it is necessary to replace the tests_require option to adapt to the current environment.
Thanks!
ROS Version: Humble
OS Version: Ubuntu22.04
Python Version: 3.10.12
setuptools Version: 75.2.0
Hello, when I build this project from source, some warnings occurred.
Hers is the output of the command
colcon build:These warnings show the
tests_requireoption is expired. But thepythonis the default package with ubuntu 22.04 andsetuptoolsis installed bypip.And then I use
colcon testto test this project, there were also some warnings.Here is the output about the command
colcon test:It seems like that there were no python testing programs to run and no result file
pytest.xmlwas generated in build directory.Then I tried to modify the
setup.pyfile in packagerqt_tf_treeand replaced the optiontests_requirewithextras_require.Finally it can be built and test correctly.
Here is the modified content in
setpu.pyfile:Now the python and setuptools version are updated very quickly, could you tell me if it is necessary to replace the
tests_requireoption to adapt to the current environment.Thanks!