Blob Blame History Raw
Name:           PyYAML
Version:        6.0.1
Release:        %autorelease
Summary:        YAML parser and emitter for Python

License:        MIT

# Fix build with Cython 3
# Proposed upstream but refused (upstream does not want Cython 3)

BuildRequires:  gcc
BuildRequires:  libyaml-devel
BuildRequires:  python3-devel

%global _description\
YAML is a data serialization format designed for human readability and\
interaction with scripting languages.  PyYAML is a YAML parser and\
emitter for Python.\
PyYAML features a complete YAML 1.1 parser, Unicode support, pickle\
support, capable extension API, and sensible error messages.  PyYAML\
supports standard YAML tags and provides Python-specific tags that\
allow to represent an arbitrary Python object.\
PyYAML is applicable for a broad range of tasks from complex\
configuration files to object serialization and persistence.

%description %_description

%package -n python3-pyyaml
Summary:        %summary
%py_provides    python3-yaml
%py_provides    python3-PyYAML

%description -n python3-pyyaml %_description

%autosetup -p1 -n pyyaml-%{version}
chmod a-x examples/yaml-highlight/

# 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



%pyproject_save_files yaml _yaml

%{py3_test_envvars} %{python3} tests/lib/

%files -n python3-pyyaml -f %{pyproject_files}
%doc CHANGES examples