From 849fc5116982cdd3d9118b6f3c13e9d1dd6ced4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 19 Mar 2025 18:47:12 +0100 Subject: [PATCH] Convert to pyproject RPM macros [skip changelog] --- python-pycparser.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 09b55f8..a929c7e 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -19,7 +19,6 @@ Patch100: pycparser-unbundle-ply.patch BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3-setuptools BuildRequires: python3-ply # for unit tests @@ -34,7 +33,6 @@ need to parse C source code. %package -n python3-pycparser Summary: %{summary} -%{?python_provide:%python_provide python3-pycparser} %description -n python3-pycparser pycparser is a complete parser for the C language, written in pure Python. @@ -50,25 +48,27 @@ rm -r pycparser/ply # Remove relative sys.path from the examples %{python3} %{SOURCE1} examples +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build -pushd build/lib/pycparser +pushd pycparser %{python3} _build_tables.py popd +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files -l pycparser %check +%pyproject_check_import %if %{with tests} %{python3} tests/all_tests.py %endif -%files -n python3-pycparser -%license LICENSE +%files -n python3-pycparser -f %{pyproject_files} %doc examples -%{python3_sitelib}/pycparser/ -%{python3_sitelib}/pycparser-*.egg-info/ %changelog %autochangelog