forked from ROCm/python-cppheaderparser
OBS-URL: https://build.opensuse.org/package/show/science:GPU:ROCm/python-cppheaderparser?expand=0&rev=2
This commit is contained in:
@@ -1,40 +1,47 @@
|
||||
%global pypi_name cppheaderparser
|
||||
%if 0%{?suse_version}
|
||||
%{?!python_module:%define python_module() python3-%{**}}
|
||||
%else
|
||||
%global python_files -n python3-cppheaderparser
|
||||
%define python_sitelib %python3_sitelib
|
||||
%define python_subpackages %nil
|
||||
%endif
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Name: python-cppheaderparser
|
||||
Version: 2.7.4
|
||||
Release: 17%{?dist}
|
||||
Release: 18%{?dist}
|
||||
Summary: Parse C++ header files and generate a data structure
|
||||
|
||||
License: BSD-3-Clause
|
||||
URL: http://senexcanis.com/open-source/cppheaderparser/
|
||||
%if 0%{?suse_version}
|
||||
Source0: CppHeaderParser-2.7.4.tar.gz
|
||||
%else
|
||||
Source0: %{pypi_source CppHeaderParser}
|
||||
%endif
|
||||
Patch0: 0001-cppheaderparser-silence-invalid-escape-sequence.patch
|
||||
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module setuptools}
|
||||
Requires: %{python_module ply}
|
||||
Provides: %{python_module cppheaderparser}
|
||||
Provides: python3-cppheaderparser
|
||||
%else
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3dist(setuptools)
|
||||
Requires: python3dist(ply)
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Parse C++ header files and generate a data structure representing the
|
||||
class.
|
||||
|
||||
%package -n python3-%{pypi_name}
|
||||
%if 0%{?fedora}
|
||||
%package -n python3-cppheaderparser
|
||||
Summary: %{summary}
|
||||
|
||||
BuildRequires: python3-devel
|
||||
%if 0%{?suse_version}
|
||||
# TW
|
||||
BuildRequires: python311-setuptools
|
||||
%else
|
||||
BuildRequires: python3dist(setuptools)
|
||||
%endif
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
%description -n python3-cppheaderparser
|
||||
Parse C++ header files and generate a data structure representing the
|
||||
class.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n CppHeaderParser-%{version}
|
||||
@@ -45,16 +52,21 @@ sed -i -e '/^#!\//, 1d' CppHeaderParser/CppHeaderParser.py
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%{?python_build: %python_build}
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%{?python_install: %python_install}
|
||||
|
||||
%files -n python3-%{pypi_name}
|
||||
%files %{python_files}
|
||||
%doc README.txt README.html
|
||||
%{python3_sitelib}/CppHeaderParser/
|
||||
%{python3_sitelib}/CppHeaderParser-%{version}-py%{python3_version}.egg-info/
|
||||
%{python_sitelib}/CppHeaderParser/
|
||||
%{python_sitelib}/CppHeaderParser*.egg-info/
|
||||
|
||||
%changelog
|
||||
* Thu Feb 13 2025 Tom Rix <Tom.Rix@amd.com> - 2.7.4-18
|
||||
- Fix SLE 15.6
|
||||
|
||||
* Wed Feb 5 2025 Tom Rix <Tom.Rix@amd.com> - 2.7.4-17
|
||||
- Fix TW build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user