From ca692006488c82491e0f511fb4d8c4f13921682b Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 23 Oct 2026 08:26:17 +0000 Subject: automatic import of ros-humble-scenario-execution-gazebo --- scenario-execution-gazebo.spec | 79 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 scenario-execution-gazebo.spec (limited to 'scenario-execution-gazebo.spec') diff --git a/scenario-execution-gazebo.spec b/scenario-execution-gazebo.spec new file mode 100644 index 0000000..3b1c139 --- /dev/null +++ b/scenario-execution-gazebo.spec @@ -0,0 +1,79 @@ +%define ros_distro humble +%define RosPkgName scenario-execution-gazebo + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 1.2.0 +Release: 1%{?dist} +Summary: Scenario Execution library for Gazebo +License: Apache-2.0 +URL: https://github.com/cps-test-lab/scenario-execution +Source0: https://github.com/cps-test-lab/scenario-execution/archive/refs/heads/humble.tar.gz + +# debug 子包无意义(/opt 前缀,strip/debugedit 路径非常规),SIG 模板统一关闭 +%global debug_package %{nil} +# /opt 下 python 字节码编译会写标准 sitelib 路径,摘掉 brp-python-bytecompile +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +# ROS 包不做自动依赖扫描(.so / .py 全在 /opt/ros 下,由 ament 间接依赖模型替代) +%global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ +%global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +# scenario_execution_ros —— 同仓库兄弟包,rosdistro 全量清单(ros-upstream.list)真实存在 +BuildRequires: ros-%{ros_distro}-scenario-execution-ros + +# 运行时 Requires(ROS 特有,必须手写):/opt/ros 被 __requires_exclude_from 豁免、autodeps 扫不到 +# 三件套:ros-workspace 提供 /opt/ros//setup.sh 与环境 hooks;ament-cmake 提供 ament 运行期钩子 +Requires: ros-%{ros_distro}-ros-workspace +Requires: ros-%{ros_distro}-ament-cmake +# scenario_execution_ros 的 exec 部分 +Requires: ros-%{ros_distro}-scenario-execution-ros +# rclpy —— SIG 源已有(ros-projects.list) +Requires: ros-%{ros_distro}-rclpy +# py_trees —— 归一化为连字符,SIG 源已有(ros-projects.list) +Requires: ros-%{ros_distro}-py-trees +# python3-transforms3d —— 实证 openEuler 默认源无 provider,照写待 verify_spec_requires.py 注册递归引入(PyPI 纯 Python 包,走普通引入链) +Requires: python3-transforms3d +# python3-defusedxml —— openEuler 源有 provider +Requires: python3-defusedxml + +# 单包策略:ROS 包严禁拆实体子包,用虚拟 Provides 别名兼容依赖方 +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description +Scenario Execution library for Gazebo. Provides Gazebo-specific actions +(spawn/delete/relative-spawn actor, actor-exists, wait-for-sim) and an OSC +library for the scenario execution framework. + +%prep +%autosetup -n scenario-execution-humble + +%build +# ROS 基座环境(chroot 可能无 setup.sh,用 [ -f ] 守卫) +[ -f /opt/ros/%{ros_distro}/setup.sh ] && source /opt/ros/%{ros_distro}/setup.sh || true +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages${PYTHONPATH:+:$PYTHONPATH} +export PKG_CONFIG_PATH=/opt/ros/%{ros_distro}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} + +# monorepo 子包:进入 libs/scenario_execution_gazebo 构建 +cd libs/scenario_execution_gazebo +%{__python3} setup.py build + +%install +[ -f /opt/ros/%{ros_distro}/setup.sh ] && source /opt/ros/%{ros_distro}/setup.sh || true +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages${PYTHONPATH:+:$PYTHONPATH} +export PKG_CONFIG_PATH=/opt/ros/%{ros_distro}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} + +cd libs/scenario_execution_gazebo +# ament_python 形态:setup.py install 装进 /opt/ros/ 前缀 +# --prefix 使 pure-python 模块装进 lib/python/site-packages,data_files 装进 share/ +%{__python3} setup.py install --skip-build --root=%{buildroot} --prefix=/opt/ros/%{ros_distro} + +%files +# 整树拥有 /opt/ros/(SIG 模板标准做法,对「装了没打包」类错误免疫) +/opt/ros/%{ros_distro} + +%changelog +* Fri Oct 23 2026 openEuler ROS SIG - 1.2.0-1 +- Initial package for scenario-execution-gazebo (ament_python, from cps-test-lab/scenario-execution humble branch) -- cgit v1.2.3