File ament_package.spec of Package ament_package

# ament_python template
%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/humble/.*$
%global __requires_exclude_from ^/opt/ros/humble/.*$

Name:           ros-humble-ament-package
Version:        0.14.2
Release:        1%{?dist}
Summary:        ROS ament_package package

License:        Apache License 2.0
Group:          Development/Libraries
Source0:        ament_package-release.tar.bz2
Source1:        ros-rpmlintrc

Requires:       python313-importlib-metadata
Requires:       python313-importlib-resources
Requires:       python313-setuptools
Requires:       ros-humble

# Default BuildRequires Includes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes

# Generated BuildRequires Includes - Start
BuildRequires:  %{python_module devel}
BuildRequires:  python313-flake8
BuildRequires:  python313-importlib-metadata
BuildRequires:  python313-importlib-resources
BuildRequires:  python313-pytest
BuildRequires:  python313-setuptools
BuildRequires:  ros-humble
# Generated BuildRequires Includes - End


%description
The parser for the manifest files in the ament buildsystem.

%prep
%autosetup -p0 -n ament_package-release

%build
# Needed to bootstrap since the ros_workspace package does not yet exist.
export PYTHONPATH=/opt/ros/humble/lib/python%{python3_version}/site-packages

# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree and source it.  It will set things like
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi
%pyproject_wheel

%install
# Needed to bootstrap since the ros_workspace package does not yet exist.
export PYTHONPATH=/opt/ros/humble/lib/python%{python3_version}/site-packages

# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree and source it.  It will set things like
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi
export PIP_PREFIX="/opt/ros/humble"
%pyproject_install

# Disable checks - For now.
%if 0
%check
# Needed to bootstrap since the ros_workspace package does not yet exist.
export PYTHONPATH=/opt/ros/humble/lib/python%{python3_version}/site-packages

# Look for a directory with a name indicating that it contains tests
TEST_TARGET=$(ls -d * | grep -m1 "\(test\|tests\)" ||:)
if [ -n "$TEST_TARGET" ] && %__python3 -m pytest --version; then
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree and source it.  It will set things like
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi
%__python3 -m pytest $TEST_TARGET || echo "RPM TESTS FAILED"
else echo "RPM TESTS SKIPPED"; fi
%endif

%files
/opt/ros/humble

%changelog
* Mon Mar 02 2026 Audrow Nash <audrow@openrobotics.org> - 0.14.2-1
- Autogenerated by Bloom

openSUSE Build Service is sponsored by