python-yaml/python-yaml.spec

107 lines
3.8 KiB
RPMSpec
Raw Normal View History

%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-yaml
Version: 6.0.1
Release: 2mamba
Summary: YAML parser and emitter for Python
Group: System/Libraries/Python
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://pyyaml.org/wiki/PyYAML
Source: http://pypi.debian.net/PyYAML/PyYAML-%{version}.tar.gz
Patch0: python-yaml--cython-3.0.2.patch
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libpython311-devel
BuildRequires: libyaml-devel
## AUTOBUILDREQ-END
BuildRequires: python3-devel >= 3.11.5-3mamba
%description
YAML parser and emitter for python:
* a complete YAML 1.1 parser. In particular, Python-YAML can parse all examples from the specification. The parsing algorithm is simple enough to be a reference for YAML parser implementors.
* Unicode support including UTF-8/UTF-16 input/output and \u escape sequences.
* low-level event-based parser and emitter API (like SAX).
* high-level API for serializing and deserializing native Python objects (like DOM or pickle).
* support for all types from the YAML types repository. A simple extension API is provided.
* both pure-Python and fast LibYAML-based parsers and emitters.
* relatively sensible error messages.
%if 0%{?with_pyver}
%define py_requires_append \
Provides: PyYAML-%{?with_pyver} \
Obsoletes: PyYAML-%{?with_pyver} < 6.0.1-2mamba
%pyver_package
%endif
%prep
%setup -q -n PyYAML-%{version}
# FIXME: Work in progress patch from upstream pull requests
%patch 0 -p1 -b .cython-3.0.2
sed -i "s|Cython<3.0|Cython|" pyproject.toml
%build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel --config-setting=--with-libyaml
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} -m installer --destdir=%{buildroot} dist/*.whl
#%if "%{?with_pyver}" != "3"
## Rename any conflicting file outside of python site packages tree
#for f in %{_bindir}/pdm; do
# mv %{buildroot}${f}{,-%{?pyappend}}
#done
#%endif
%files %{?pyappend}
%defattr(-,root,root)
%dir %{python_sitearch}/PyYAML-%{version}.dist-info
%{python_sitearch}/PyYAML-%{version}.dist-info/*
%dir %{python_sitearch}/%{pkgname}
%{python_sitearch}/%{pkgname}/*
%dir %{python_sitearch}/_%{pkgname}
%{python_sitearch}/_%{pkgname}/*
%changelog
* Fri Sep 29 2023 Automatic Build System <autodist@mambasoft.it> 6.0.1-2mamba
- rebuilt by autoport with build requirements: python3-devel>=3.11.5-3mamba
* Tue Jul 18 2023 Automatic Build System <autodist@mambasoft.it> 6.0.1-1mamba
- automatic version update by autodist
* Fri Jun 24 2022 Automatic Build System <autodist@mambasoft.it> 6.0-1mamba
- automatic version update by autodist
* Sun Apr 03 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.1-3mamba
- rebuilt with python 3.10
* Sun May 09 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.1-2mamba
- rebuilt with distdeps
* Sun Feb 21 2021 Automatic Build System <autodist@mambasoft.it> 5.4.1-1mamba
- automatic version update by autodist
* Wed Sep 09 2020 Automatic Build System <autodist@mambasoft.it> 5.3.1-1mamba
- automatic update by autodist
* Fri Aug 09 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.2-1mamba
- update to 5.1.2
* Thu Sep 06 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 3.13-1mamba
- update to 3.13
* Sun Sep 18 2016 Automatic Build System <autodist@mambasoft.it> 3.12-1mamba
- automatic update by autodist
* Wed Apr 02 2014 Automatic Build System <autodist@mambasoft.it> 3.11-1mamba
- automatic update by autodist
* Thu Nov 22 2012 Automatic Build System <autodist@mambasoft.it> 3.10-1mamba
- automatic version update by autodist
* Sun Nov 15 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 3.09-1mamba
- package created by autospec