%global __tar /opt/freeware/bin/tar %define name python3-pyyaml %define srcname PyYAML %define version 5.4.1.1 %define release 1 %define is_python %(test -e /opt/freeware/bin/python3_32 && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(/opt/freeware/bin/python3_32 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif %define _libdir64 %{_prefix}/lib64 %define is_python_64 %(test -e /opt/freeware/bin/python3_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(/opt/freeware/bin/python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif Summary: YAML parser and emitter for Python Name: %{name} Version: %{version} Release: %{release} Source0: https://github.com/yaml/pyyaml/archive/refs/tags/%{version}.tar.gz Url: https://github.com/yaml/pyyaml License: MIT Group: Development/Libraries Prefix: %{_prefix} BuildRequires: python3 >= 3.7.9 BuildRequires: python3-devel >= 3.7.9 BuildRequires: libyaml-devel >= 0.2.2 BuildRequires: python3-Cython >= 0.29.22 Requires: libyaml >= 0.2.2 Provides: python3-pyyaml = %{version}-%{release} Provides: python3-pyyaml%{?_isa} = %{version}-%{release} Provides: python3-PyYAML = %{version}-%{release} Provides: python3-PyYAML%{?_isa} = %{version}-%{release} %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 persistance. %prep %setup -q -n pyyaml-%{version} chmod a-x examples/yaml-highlight/yaml_hl.py %build /opt/freeware/bin/python3 setup.py --with-libyaml build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT /opt/freeware/bin/python3 setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} %check /opt/freeware/bin/python3 setup.py test %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc LICENSE CHANGES README examples %{python_sitelib64}/* %changelog * Tue Apr 06 2021 Rishita Saha - 5.4.1.1-1 - Updated to fix CVE-2020-14343 * Fri Mar 27 2020 Baanu Tumma - 5.3.1-1 - Updated to latest version for fixing CVE CVE-2019-20477 * Mon Dec 02 2019 Baanu Tumma - 5.1.2-1 - Updated to latest version, built using python3 * Mon Feb 02 2015 Gerard Visiedo - 3.11-2 - Rebuilt with "build" onsted of "buildÃ_ext" compile option * Thu Oct 30 2014 Gerard Visiedo - 3.11-1 - first version for AIX V6.1 and higher