File babeltrace2.spec of Package failed_babeltrace2

Name:           babeltrace2
Version:        2.1.0
Release:        1.1
Summary:        Trace conversion and processing tool - Babeltrace 2
License:        MIT
URL:            https://github.com/babeltrace/babeltrace
Source0:        %{name}-%{version}.tar.bz2

# Minimal and safe set of build requirements. Added python3-setuptools
# because Python >= 3.12 removed distutils and setuptools is required
# for building the Python bindings (see configure error in build log).
BuildRequires:  gcc
BuildRequires:  g++
BuildRequires:  make
BuildRequires:  pkgconfig
BuildRequires:  glib2-devel
BuildRequires:  libffi-devel
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  swig
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pkgconfig
BuildRequires:  docbook-xsl
BuildRequires:  libxml2-devel
BuildRequires:  libtool
BuildRequires:  autoconf
BuildRequires:  automake

# If you prefer to disable Python bindings instead of adding setuptools,
# you could change %configure flags below; we choose to install setuptools
# to allow building the upstream Python bindings.

%description
Babeltrace is a trace conversion and processing tool. This package contains
the babeltrace2 library and utilities.

%prep
%setup -q

%build
export PYTHON=python3
export PYTHON_CONFIG=python3-config
%configure --host=%{_target_platform} --build=%{_target_platform} \
    --program-prefix= \
    --disable-dependency-tracking \
    --prefix=/usr \
    --exec-prefix=/usr \
    --bindir=/usr/bin \
    --sbindir=/usr/sbin \
    --sysconfdir=/etc \
    --datadir=/usr/share \
    --includedir=/usr/include \
    --libdir=/usr/lib64 \
    --libexecdir=/usr/libexec \
    --localstatedir=/var \
    --sharedstatedir=/var/lib \
    --mandir=/usr/share/man \
    --infodir=/usr/share/info \
    --disable-static \
    --disable-Werror \
    --docdir=/usr/share/doc/packages/%{name} \
    --enable-python-bindings
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install

%files
%license LICENSE
%doc README.md
%{_bindir}/babeltrace
%{_libdir}/*.so*
/usr/share/doc/packages/%{name}

%changelog
* Fri Aug 08 2025 Your Name <you@example.com> - 2.1.0-1.1
- Add BuildRequires: python3-setuptools to satisfy Python >= 3.12 build-time requirement for setuptools (distutils removal).
openSUSE Build Service is sponsored by