File python-libdebug.spec of Package python-libdebug
#
# spec file for package python-libdebug
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-libdebug
Version: 0.9.0
Release: 0
Summary: A Python library for the debugging of binary executables
License: MIT
URL: https://libdebug.org
Source: https://github.com/libdebug/libdebug/archive/%{version}/%{name}-%{version}.tar.gz
# FIX-UPSTREAM: bump version
Patch1: https://github.com/libdebug/libdebug/commit/f4f2eb84b938dfe20e3720165cf558d7d7d92877.patch#/bump-version.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module nanobind >= 1.3.2}
BuildRequires: %{python_module nanobind-devel >= 1.3.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module scikit-build-core >= 0.4.3}
BuildRequires: %{python_module typing_extensions}
BuildRequires: binutils-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libdwarf-devel
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(libelf)
Requires: libdwarf0
Requires: python-prompt-toolkit
Requires: python-psutil
Requires: python-pyelftools
Requires: python-requests
Recommends: glibc-debuginfo
Suggests: python-rich
ExclusiveArch: %{x86_64} %{arm64} %{ix86}
# SECTION test requirements
BuildRequires: %{python_module curses}
BuildRequires: %{python_module objgraph}
BuildRequires: %{python_module prompt-toolkit}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pwntools}
BuildRequires: %{python_module pyelftools}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
# /SECTION
%python_subpackages
%description
libdebug is an open source Python library for programmatic debugging of userland binary executables.
libdebug provides a comprehensive set of building blocks designed to facilitate the development of
debugging tools for different purposes, including reverse engineering and exploitation.
%prep
%autosetup -p1 -n libdebug-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitearch}/libdebug
%{python_sitearch}/libdebug-%{version}.dist-info
%changelog