Files
python-libdebug/python-libdebug.spec
2025-04-16 21:45:24 +02:00

86 lines
3.0 KiB
RPMSpec

#
# 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.8.0.post2
Release: 0
Summary: A Python library for the debugging of binary executables
License: MIT
URL: https://libdebug.org
Source: https://files.pythonhosted.org/packages/source/l/libdebug/libdebug-%{version}.tar.gz
Patch1: cmakelist-fixes.patch
BuildRequires: python-rpm-macros
BuildRequires: gcc-c++
BuildRequires: ninja
BuildRequires: binutils-devel
BuildRequires: libelf-devel
BuildRequires: libdwarf-devel
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}
# SECTION test requirements
BuildRequires: %{python_module prompt-toolkit}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pyelftools}
BuildRequires: %{python_module requests}
# /SECTION
BuildRequires: fdupes
Requires: libdwarf0
Requires: python-prompt-toolkit
Requires: python-psutil
Requires: python-pyelftools
Requires: python-requests
Suggests: python-rich
%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.
%package devel
Summary: Development files for libdebug
%description devel
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
export CMAKE_GENERATOR=Ninja
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{_libdir}/python%{python_version}/site-packages/
%files %{python_files devel}
%doc README.md
%license LICENSE
%{_libdir}/python%{python_version}/site-packages/libdebug
%{_libdir}/python%{python_version}/site-packages/libdebug-%{version}.dist-info
%changelog