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