-
Notifications
You must be signed in to change notification settings - Fork 58
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
:
--- stderr: generate_parameter_library_py
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
---
Finished <<< generate_parameter_library_py [1.28s]
--- stderr: generate_parameter_module_example
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
---
Finished <<< generate_parameter_module_example [2.57s]
These warnings show the tests_require
option is expired. But the python and setuptools are default package with the ubuntu22.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
:
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: generate_parameter_library_py
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
---
Finished <<< generate_parameter_library_py [0.30s]
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: generate_parameter_module_example
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
---
Finished <<< generate_parameter_module_example [0.37s]
It seems like that there were no python testing programs to run in generate_parameter_library_py
and generate_parameter_module_example
and no result file pytest.xml
was generated in build directory.
Then I tried to modify the setup.py
file in packages and replaced the option tests_require
with extras_require
.
Finally these packages can be built and test correctly.
Here is the modified contents 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 modify it to adapt to the current environment.
Thanks!