micro-ROS / micro-ROS/system_modes

UserWarning: Unknown distribution option: 'tests_require'

未关闭
#101 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C++
星标
45
派生
13
PR 合并指标
30 天内没有已合并 PR

描述

- 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 >>> launch_system_modes
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: launch_system_modes

/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
---
Finished <<< launch_system_modes [1.53s]

```

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 >>> launch_system_modes

/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: launch_system_modes

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
---
Finished <<< launch_system_modes [0.72s]

```
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 `launch_system_modes` 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
```

But there are some format errors after running `colcon test`. Here is the result:

[launch_system_modes.log](https://github.com/user-attachments/files/21450880/launch_system_modes.log)

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!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 launch_system_modes 包中的 setup.py 开始,使用所述的 ROS、Ubuntu、Python 和 setuptools 版本重现报告中的 colcon build 和 colcon test 输出。将当前的 tests_require 配置与报告中的 extras_require 更改进行比较,然后使用 launch_system_modes.log 和 build 目录确定警告、测试执行以及 pytest.xml 输出是否已解决。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
build-system, testing
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。