%global _empty_manifest_terminate_build 0
Name: python-drgn
Version: 0.0.22
Release: 1
Summary: Programmable debugger
License: LGPL-2.1-or-later
URL: https://github.com/osandov/drgn
Source0: https://mirrors.aliyun.com/pypi/web/packages/75/31/70127c7977376fed408a36934a1dcbf2d947f9322af2036419b2c8a787de/drgn-0.0.22.tar.gz
BuildArch: noarch
%description
drgn (pronounced "dragon") is a debugger with an emphasis on programmability.
drgn exposes the types and variables in a program for easy, expressive
scripting in Python. For example, you can debug the Linux kernel:
>>> from drgn.helpers.linux import list_for_each_entry
>>> for mod in list_for_each_entry('struct module',
(char [56])"snd"
(char [56])"evdev"
(char [56])"i915"
Although other debuggers like `GDB `_ have
scripting support, drgn aims to make scripting as natural as possible so that
debugging feels like coding. This makes it well-suited for introspecting the
complex, inter-connected state in large programs.
Additionally, drgn is designed as a library that can be used to build debugging
and introspection tools; see the official `tools
`_.
drgn was developed at `Meta `_ for debugging the
Linux kernel (as an alternative to the `crash
`_ utility), but it can also debug userspace
programs written in C. C++ support is in progress.
Documentation can be found at `drgn.readthedocs.io
`_.
%package -n python3-drgn
Summary: Programmable debugger
Provides: python-drgn
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-drgn
drgn (pronounced "dragon") is a debugger with an emphasis on programmability.
drgn exposes the types and variables in a program for easy, expressive
scripting in Python. For example, you can debug the Linux kernel:
>>> from drgn.helpers.linux import list_for_each_entry
>>> for mod in list_for_each_entry('struct module',
(char [56])"snd"
(char [56])"evdev"
(char [56])"i915"
Although other debuggers like `GDB `_ have
scripting support, drgn aims to make scripting as natural as possible so that
debugging feels like coding. This makes it well-suited for introspecting the
complex, inter-connected state in large programs.
Additionally, drgn is designed as a library that can be used to build debugging
and introspection tools; see the official `tools
`_.
drgn was developed at `Meta `_ for debugging the
Linux kernel (as an alternative to the `crash
`_ utility), but it can also debug userspace
programs written in C. C++ support is in progress.
Documentation can be found at `drgn.readthedocs.io
`_.
%package help
Summary: Development documents and examples for drgn
Provides: python3-drgn-doc
%description help
drgn (pronounced "dragon") is a debugger with an emphasis on programmability.
drgn exposes the types and variables in a program for easy, expressive
scripting in Python. For example, you can debug the Linux kernel:
>>> from drgn.helpers.linux import list_for_each_entry
>>> for mod in list_for_each_entry('struct module',
(char [56])"snd"
(char [56])"evdev"
(char [56])"i915"
Although other debuggers like `GDB `_ have
scripting support, drgn aims to make scripting as natural as possible so that
debugging feels like coding. This makes it well-suited for introspecting the
complex, inter-connected state in large programs.
Additionally, drgn is designed as a library that can be used to build debugging
and introspection tools; see the official `tools
`_.
drgn was developed at `Meta `_ for debugging the
Linux kernel (as an alternative to the `crash
`_ utility), but it can also debug userspace
programs written in C. C++ support is in progress.
Documentation can be found at `drgn.readthedocs.io
`_.
%prep
%autosetup -n drgn-0.0.22
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-drgn -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Jun 20 2023 Python_Bot - 0.0.22-1
- Package Spec generated