-
Notifications
You must be signed in to change notification settings - Fork 156
Description
-
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:
Starting >>> teleop_tools_msgs
Starting >>> key_teleop
Starting >>> mouse_teleop
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: key_teleop
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
---
Finished <<< key_teleop [1.49s]
--- stderr: mouse_teleop
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
---
Finished <<< mouse_teleop [1.48s]
Finished <<< teleop_tools_msgs [4.69s]
Starting >>> joy_teleop
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: joy_teleop
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
---
Finished <<< joy_teleop [1.35s]
Starting >>> teleop_tools
Finished <<< teleop_tools [0.94s]
Summary: 5 packages finished [7.09s]
3 packages had stderr output: joy_teleop key_teleop mouse_teleop
These warnings show the tests_require option is expired. But the python and setuptools are default package with the ubuntu 22.04.
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 >>> teleop_tools_msgs
Starting >>> key_teleop
Starting >>> mouse_teleop
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: key_teleop
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
---
Finished <<< key_teleop [0.49s]
--- stderr: mouse_teleop
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
---
Finished <<< mouse_teleop [0.54s]
Finished <<< teleop_tools_msgs [9.23s]
Starting >>> joy_teleop
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: joy_teleop
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
---
Finished <<< joy_teleop [0.31s]
Starting >>> teleop_tools
Finished <<< teleop_tools [0.04s]
Summary: 5 packages finished [9.70s]
3 packages had stderr output: joy_teleop key_teleop mouse_teleop
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 joy_teleop, key_teleop, mouse_teleop 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!