diff options
Diffstat (limited to 'create3-examples-py.spec')
| -rw-r--r-- | create3-examples-py.spec | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/create3-examples-py.spec b/create3-examples-py.spec new file mode 100644 index 0000000..cb31368 --- /dev/null +++ b/create3-examples-py.spec @@ -0,0 +1,62 @@ +%define ros_distro humble +%define RosPkgName create3-examples-py +%define src_version 0.0.5-1 + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 0.0.5 +Release: 1%{?dist} +Summary: Python examples for interacting with the iRobot(R) Create(R) 3 Educational Robo +License: BSD +URL: https://github.com/iRobotEducation/create3_examples/tree/humble +Source0: %{RosPkgName}-%{src_version}.tar.gz + +%global debug_package %{nil} +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +%global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ +%global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ + +BuildRequires: ros-%{ros_distro}-geometry-msgs +BuildRequires: ros-%{ros_distro}-irobot-create-msgs +BuildRequires: ros-%{ros_distro}-rclpy +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +Requires: ros-%{ros_distro}-ros-workspace +Requires: ros-%{ros_distro}-ament-cmake +Requires: ros-%{ros_distro}-geometry-msgs +Requires: ros-%{ros_distro}-irobot-create-msgs +Requires: ros-%{ros_distro}-rclpy + +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description +Python examples for interacting with the iRobot(R) Create(R) 3 Educational Robot + +%prep +%autosetup -n %{RosPkgName}-%{src_version} + +%build +[ -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 create3_examples_py +%{__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 create3_examples_py +%{__python3} setup.py install --skip-build --root %{buildroot} \ + --prefix /opt/ros/%{ros_distro} \ + --install-lib /opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages \ + --single-version-externally-managed --record installed.txt + +%files +/opt/ros/%{ros_distro} + +%changelog +* Thu Oct 08 2026 ai-importer <ai-importer@openeuler.org> - 0.0.5-1 +- Initial import (ROS batch) |
