%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global py_minor 16 %global python_major python%{py_major} %global pkgname pyyaml %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") %global python3_sitearch64 %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") Name: %{python_major}-%{pkgname} Version: 5.4.1.1 Release: 2 Summary: YAML parser and emitter for Python License: MIT URL: https://github.com/yaml/pyyaml Source0: https://github.com/yaml/pyyaml/archive/refs/tags/%{version}.tar.gz Group: Development/Libraries Prefix: %{_prefix} BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 BuildRequires: libyaml-devel >= 0.2.2 BuildRequires: %{python_major}-Cython >= 0.29.22 Requires: %{python_major} >= %{py_major}.%{py_minor} Requires: libyaml >= 0.2.2 %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. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n pyyaml-%{version} chmod a-x examples/yaml-highlight/yaml_hl.py %build export PATH=/opt/freeware/bin:$PATH %{python_major} setup.py --with-libyaml build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install -O1 --root ${RPM_BUILD_ROOT} %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc LICENSE CHANGES README examples %{python3_sitearch64}/* %files -n %{meta_package} %defattr(-,root,system,-) %changelog * Wed Feb 15 2023 Ranjit Ranjan - 5.4.1.1-2 - pyyaml build for python3.9 * 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