|
|
|
@ -1,31 +1,30 @@
|
|
|
|
|
# Python 2 removal, RHBZ#1775075
|
|
|
|
|
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
|
|
|
|
|
%bcond_with python2
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without python2
|
|
|
|
|
%endif
|
|
|
|
|
## START: Set by rpmautospec
|
|
|
|
|
## (rpmautospec version 0.6.5)
|
|
|
|
|
## RPMAUTOSPEC: autorelease, autochangelog
|
|
|
|
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
|
|
|
release_number = 19;
|
|
|
|
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
|
|
|
print(release_number + base_release_number - 1);
|
|
|
|
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
|
|
|
|
## END: Set by rpmautospec
|
|
|
|
|
|
|
|
|
|
Name: PyYAML
|
|
|
|
|
Version: 5.4.1
|
|
|
|
|
Release: 6%{?dist}
|
|
|
|
|
%global uversion %{version}
|
|
|
|
|
Version: 6.0.1
|
|
|
|
|
Release: %autorelease
|
|
|
|
|
Summary: YAML parser and emitter for Python
|
|
|
|
|
|
|
|
|
|
# SPDX
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/yaml/pyyaml
|
|
|
|
|
Source0: https://github.com/yaml/pyyaml/archive/%{uversion}.tar.gz
|
|
|
|
|
Source: https://github.com/yaml/pyyaml/archive/%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
# Fix build with Cython 3
|
|
|
|
|
# Proposed upstream but refused (upstream does not want Cython 3)
|
|
|
|
|
Patch: https://github.com/yaml/pyyaml/pull/731.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: libyaml-devel
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-Cython
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description\
|
|
|
|
@ -44,20 +43,6 @@ configuration files to object serialization and persistence.
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%package -n python2-pyyaml
|
|
|
|
|
Summary: %summary
|
|
|
|
|
Provides: python-yaml = %{version}-%{release}
|
|
|
|
|
Provides: python-yaml%{?_isa} = %{version}-%{release}
|
|
|
|
|
Provides: python2-yaml = %{version}-%{release}
|
|
|
|
|
Provides: python2-yaml%{?_isa} = %{version}-%{release}
|
|
|
|
|
Provides: PyYAML = %{version}-%{release}
|
|
|
|
|
Provides: PyYAML%{?_isa} = %{version}-%{release}
|
|
|
|
|
%{?python_provide:%python_provide python2-pyyaml}
|
|
|
|
|
|
|
|
|
|
%description -n python2-pyyaml %_description
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package -n python3-pyyaml
|
|
|
|
|
Summary: %summary
|
|
|
|
|
%py_provides python3-yaml
|
|
|
|
@ -67,66 +52,111 @@ Summary: %summary
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n pyyaml-%{uversion}
|
|
|
|
|
%autosetup -p1 -n pyyaml-%{version}
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
# py2_build reuses Cython output from py3_build
|
|
|
|
|
%py2_build
|
|
|
|
|
%endif
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%pyproject_buildrequires
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%py2_install
|
|
|
|
|
%endif
|
|
|
|
|
%py3_install
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%pyproject_save_files yaml _yaml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%{__python2} setup.py test
|
|
|
|
|
%endif
|
|
|
|
|
%{__python3} setup.py test
|
|
|
|
|
%{py3_test_envvars} %{python3} tests/lib/test_all.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%files -n python2-pyyaml
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc CHANGES README examples
|
|
|
|
|
%{python2_sitearch}/*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-pyyaml
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc CHANGES README examples
|
|
|
|
|
%{python3_sitearch}/*
|
|
|
|
|
%files -n python3-pyyaml -f %{pyproject_files}
|
|
|
|
|
%doc CHANGES README.md examples
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Feb 08 2022 Miro Hrončok <mhroncok@redhat.com> - 5.4.1-6
|
|
|
|
|
## START: Generated by rpmautospec
|
|
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 6.0.1-19
|
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
|
|
|
|
|
|
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 6.0.1-18
|
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 6.0.1-18
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Apr 16 2024 Miro Hrončok <miro@hroncok.cz> - 6.0.1-17
|
|
|
|
|
- Add RHEL gating configuration
|
|
|
|
|
|
|
|
|
|
* Thu Apr 11 2024 Lukáš Zachar <lzachar@redhat.com> - 6.0.1-16
|
|
|
|
|
- CI: Modernize runtest.sh
|
|
|
|
|
|
|
|
|
|
* Thu Apr 11 2024 Štěpán Šigut <ssigut@redhat.com> - 6.0.1-15
|
|
|
|
|
- Import CI tests from RHEL
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-14
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-13
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Aug 10 2023 Karolina Surma <ksurma@redhat.com> - 6.0.1-12
|
|
|
|
|
- Declare the license as an SPDX expression
|
|
|
|
|
|
|
|
|
|
* Fri Jul 28 2023 Miro Hrončok <mhroncok@redhat.com> - 6.0.1-4
|
|
|
|
|
- Fix build with Cython 3
|
|
|
|
|
|
|
|
|
|
* Tue Jul 25 2023 Miro Hrončok <mhroncok@redhat.com> - 6.0.1-3
|
|
|
|
|
- Pin Cython < 3 to build this package
|
|
|
|
|
|
|
|
|
|
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 18 2023 John Eckersberg <jeckersb@redhat.com> - 6.0.1-1
|
|
|
|
|
- New upstream release 6.0.1 (rhbz#2223462)
|
|
|
|
|
|
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 6.0-8
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Tue Apr 11 2023 John Eckersberg <jeckersb@redhat.com> - 6.0-7
|
|
|
|
|
- Rebuilt for Python 3.12 / Cython 0.29.34 (rhbz#2177815)
|
|
|
|
|
|
|
|
|
|
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 6.0-4
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Tue Feb 08 2022 Miro Hrončok <mhroncok@redhat.com> - 6.0-3
|
|
|
|
|
- Remove some outdated Obsoletes and Provides,
|
|
|
|
|
but keep providing python3-yaml and python3-PyYAML for users
|
|
|
|
|
- Related: rhbz#1990421
|
|
|
|
|
|
|
|
|
|
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 5.4.1-5
|
|
|
|
|
- Add automatically generated Obsoletes tag with the python39- prefix
|
|
|
|
|
for smoother upgrade from RHEL8
|
|
|
|
|
- Related: rhbz#1990421
|
|
|
|
|
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Oct 13 2021 John Eckersberg <jeckersb@redhat.com> - 6.0-1
|
|
|
|
|
- New upstream release 6.0
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 5.4.1-4
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
* Mon Oct 4 2021 John Eckersberg <jeckersb@redhat.com> - 6.0-0.1.b1
|
|
|
|
|
- New upstream beta release 6.0b1 (rhbz#2010501)
|
|
|
|
|
|
|
|
|
|
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 5.4.1-3
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.1-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 5.4.1-3
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.1-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
@ -387,3 +417,5 @@ rm -rf ext/_yaml.c
|
|
|
|
|
|
|
|
|
|
* Mon Dec 17 2007 John Eckersberg <jeckersb@redhat.com> - 3.05-1
|
|
|
|
|
- Initial packaging for Fedora
|
|
|
|
|
|
|
|
|
|
## END: Generated by rpmautospec
|
|
|
|
|