File python-lief.spec of Package python-lief
#
# spec file for package python-lief
#
# Copyright (c) 2026, Martin Hauke <mardnh@gmx.de>
#
# 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-lief
Version: 0.17.5
Release: 0
Summary: Library to instrument executable formats
License: Apache-2.0
URL: https://lief.re/
Source: https://github.com/lief-project/LIEF/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pydantic-core}
BuildRequires: %{python_module pydantic}
BuildRequires: %{python_module scikit_build_core}
BuildRequires: %{python_module setuptools >= 61.0.0}
BuildRequires: %{python_module tomli}
BuildRequires: %{python_module wheel}
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: ninja
BuildRequires: python-rpm-macros
%python_subpackages
%description
LIEF: Library to Instrument Executable Formats.
%prep
%autosetup -n LIEF-%{version}
%build
cd api/python
%pyproject_wheel
%install
cd api/python
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# no tests exist
%files %{python_files}
%license LICENSE
%doc api/python/README.rst
%{python_sitearch}/lief
%{python_sitearch}/lief-*.dist-info
%exclude %{python3_sitearch}/lief/**/__pycache__/*
%changelog