summaryrefslogtreecommitdiff
path: root/nebula-continental.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-10-08 12:26:11 +0000
committerCoprDistGit <infra@openeuler.org>2026-10-08 12:26:11 +0000
commit31f071b5b21316b429c98d336aac5f5a18d8933a (patch)
tree980793f73c2e85e56c3fe8c32720b204ead4c836 /nebula-continental.spec
parenta84993d21f3f5de373c73a462337103f7287f0a9 (diff)
automatic import of ros-humble-nebula-continental
Diffstat (limited to 'nebula-continental.spec')
-rw-r--r--nebula-continental.spec19
1 files changed, 18 insertions, 1 deletions
diff --git a/nebula-continental.spec b/nebula-continental.spec
index 8b2510c..8d76c4f 100644
--- a/nebula-continental.spec
+++ b/nebula-continental.spec
@@ -20,7 +20,7 @@
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 1.2.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Nebula Continental ROS Wrapper
License: Apache-2.0
URL: https://github.com/tier4/nebula
@@ -223,6 +223,16 @@ cmake .. \
%make_build
%install
+# RPM 的 build 段与 install 段是独立 shell 脚本,build 段的 export 不传递。
+# make install 触发 cmake_check_build_system → 重跑 templates_2_cmake.py
+# → import ament_package,必须设 PYTHONPATH 让 /usr/bin/python3 能找到
+# /opt/ros/humble/lib/python3.11/site-packages/ament_package
+[ -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}
+_STAGED="%{buildroot}/opt/ros/%{ros_distro}"
+export AMENT_PREFIX_PATH="${_STAGED}:/opt/ros/%{ros_distro}${AMENT_PREFIX_PATH:+:$AMENT_PREFIX_PATH}"
+
# 所有 sibling 包在 %build 阶段已 make install DESTDIR=%{buildroot},
# 仅需安装主包(nebula_continental)的最终产物
cd src/nebula_continental/nebula_continental/.obj
@@ -234,6 +244,13 @@ make install DESTDIR=%{buildroot}
/opt/ros/%{ros_distro}
%changelog
+* Thu Oct 08 2026 AI Importer <ai-importer@openeuler.org> - 1.2.0-5
+- 修复 install 段失败:make install 触发 cmake_check_build_system 重跑
+ templates_2_cmake.py → import ament_package 报 ModuleNotFoundError。
+ 根因:RPM 的 build 段与 install 段是独立 shell 脚本,build 段中 export
+ PYTHONPATH 不传递到 install 段。在 install 段开头补齐 ROS 环境变量
+ (PYTHONPATH / AMENT_PREFIX_PATH / PKG_CONFIG_PATH)
+
* Thu Oct 08 2026 AI Importer <ai-importer@openeuler.org> - 1.2.0-4
- 修复 %build 失败:%cmake3 在 .obj 当前目录配置 cmake,但 %cmake_build
展开为 cmake --build %{_vpath_builddir}(aarch64-openEuler-linux-gnu),