diff --git a/python-pycparser.spec b/python-pycparser.spec index 5fd5ea77868307916ea5616329f15493cbbf26fe..531fd8f7286ab37069d1eb54dd7bc52706c73888 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %bcond_without tests Name: python-pycparser @@ -16,7 +16,6 @@ Patch101: pycparser-disable-failed-tests.patch BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3-setuptools BuildRequires: python3-ply BuildRequires: gcc @@ -39,6 +38,13 @@ pycparser is a complete parser for the C language, written in pure Python. It is a module designed to be easily integrated into applications that need to parse C source code. +%package -n python3-pycparser-doc +Summary: doc files for python3-pycparser +Requires: python3-pycparser = %{version}-%{release} + +%description -n python3-pycparser-doc +doc files for python3-pycparser + %prep %autosetup -p1 -n pycparser-release_v%{version} @@ -48,14 +54,17 @@ rm -r pycparser/ply # Remove relative sys.path from the examples %{python3} %{SOURCE1} examples +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build +%pyproject_wheel pushd build/lib/pycparser %{python3} _build_tables.py popd %install -%py3_install +%pyproject_install %check %if %{with tests} @@ -65,10 +74,15 @@ popd %files -n python3-pycparser %license LICENSE -%doc examples %{python3_sitelib}/pycparser/ -%{python3_sitelib}/pycparser-*.egg-info/ +%{python3_sitelib}/pycparser-%{version}.dist-info/ + +%files -n python3-pycparser-doc +%doc examples %changelog +* Mon Feb 27 2023 mgb01105731 - 2.21-2 +- optimise dependency + * Tue Apr 19 2022 Zhongling He 2.21-1 - Init package from upstream v2.21