From 4068994faa71c585291f938c6007f89fe60133bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 28 Jul 2023 13:56:03 +0200 Subject: [PATCH] Use the pyproject macros --- PyYAML.spec | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/PyYAML.spec b/PyYAML.spec index d0bbb52..f808591 100644 --- a/PyYAML.spec +++ b/PyYAML.spec @@ -13,10 +13,7 @@ Patch: https://github.com/yaml/pyyaml/pull/731.patch BuildRequires: gcc BuildRequires: libyaml-devel - BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-cython %global _description\ @@ -50,25 +47,29 @@ chmod a-x examples/yaml-highlight/yaml_hl.py # remove pre-generated file rm -rf ext/_yaml.c +# we have a patch for Cython 3 +sed -i 's/Cython<3.0/Cython/' pyproject.toml + + +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files yaml _yaml %check %{__python3} setup.py test -%files -n python3-pyyaml -%license LICENSE +%files -n python3-pyyaml -f %{pyproject_files} %doc CHANGES README.md examples -%{python3_sitearch}/yaml/ -%{python3_sitearch}/_yaml/ -%{python3_sitearch}/PyYAML-*.egg-info/ %changelog