Compare commits

...

No commits in common. 'i10cs' and 'c9' have entirely different histories.
i10cs ... c9

@ -1 +1 @@
92973f1325d583f46728248bf26975fe3f62432a SOURCES/6.0.1.tar.gz efbe83434843c1963a9e56f36a9afa74a38c60a8 SOURCES/5.4.1.tar.gz

2
.gitignore vendored

@ -1 +1 @@
SOURCES/6.0.1.tar.gz SOURCES/5.4.1.tar.gz

@ -1,39 +0,0 @@
From 17dc5b6cd96dcfe64fd71789c771ca9b96d260e5 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Fri, 21 Jul 2023 09:50:00 -0400
Subject: [PATCH] Fix builds with Cython 3
This is a *de minimis* fix for building with Cython 3. Recent Cython<3
releases provided `Cython.Distutils.build_ext` as an alias to
`Cython.Distutils.old_build_ext.old_build_ext`; Cython 3 drops this
alias and instead uses a wholly new `Cython.Distutils.build_ext` that
does not provide the `cython_sources` function used in `setup.py`.
Explicitly importing `old_build_ext` preserves the existing behavior for
recent Cython<3 and uses the correct behavior for Cython 3. Should the
import fail (*e.g.*, because the version of Cython available predates
the availability of `old_build_ext`), the import falls back to just
`Cython.Distutils.build_ext`.
Signed-off-by: Andrew J. Hesford <ajh@sideband.org>
---
setup.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 944e7fa2..462b1e95 100644
--- a/setup.py
+++ b/setup.py
@@ -82,7 +82,11 @@
with_cython = True
try:
from Cython.Distutils.extension import Extension as _Extension
- from Cython.Distutils import build_ext as _build_ext
+ try:
+ from Cython.Distutils.old_build_ext import old_build_ext as _build_ext
+ except ImportError:
+ from Cython.Distutils import build_ext as _build_ext
+
with_cython = True
except ImportError:
if with_cython:

@ -1,30 +1,31 @@
## START: Set by rpmautospec # Python 2 removal, RHBZ#1775075
## (rpmautospec version 0.6.5) %if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
## RPMAUTOSPEC: autorelease, autochangelog %bcond_with python2
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: %else
release_number = 19; %bcond_without python2
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); %endif
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
Name: PyYAML Name: PyYAML
Version: 6.0.1 Version: 5.4.1
Release: %autorelease Release: 6%{?dist}
%global uversion %{version}
Summary: YAML parser and emitter for Python Summary: YAML parser and emitter for Python
# SPDX
License: MIT License: MIT
URL: https://github.com/yaml/pyyaml URL: https://github.com/yaml/pyyaml
Source: https://github.com/yaml/pyyaml/archive/%{version}.tar.gz Source0: https://github.com/yaml/pyyaml/archive/%{uversion}.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: gcc
BuildRequires: libyaml-devel BuildRequires: libyaml-devel
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%endif
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-Cython
%global _description\ %global _description\
@ -43,6 +44,20 @@ configuration files to object serialization and persistence.
%description %_description %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 %package -n python3-pyyaml
Summary: %summary Summary: %summary
%py_provides python3-yaml %py_provides python3-yaml
@ -52,111 +67,66 @@ Summary: %summary
%prep %prep
%autosetup -p1 -n pyyaml-%{version} %setup -q -n pyyaml-%{uversion}
chmod a-x examples/yaml-highlight/yaml_hl.py chmod a-x examples/yaml-highlight/yaml_hl.py
# remove pre-generated file # remove pre-generated file
rm -rf ext/_yaml.c rm -rf ext/_yaml.c
# we have a patch for Cython 3
sed -i 's/Cython<3.0/Cython/' pyproject.toml
%generate_buildrequires
%pyproject_buildrequires
%build %build
%pyproject_wheel %py3_build
%if %{with python2}
# py2_build reuses Cython output from py3_build
%py2_build
%endif
%install %install
%pyproject_install %if %{with python2}
%pyproject_save_files yaml _yaml %py2_install
%endif
%py3_install
%check %check
%{py3_test_envvars} %{python3} tests/lib/test_all.py %if %{with python2}
%{__python2} setup.py test
%endif
%files -n python3-pyyaml -f %{pyproject_files} %{__python3} setup.py test
%doc CHANGES README.md examples
%changelog
## 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 %if %{with python2}
- Add RHEL gating configuration %files -n python2-pyyaml
%license LICENSE
%doc CHANGES README examples
%{python2_sitearch}/*
%endif
* Thu Apr 11 2024 Lukáš Zachar <lzachar@redhat.com> - 6.0.1-16 %files -n python3-pyyaml
- CI: Modernize runtest.sh %license LICENSE
%doc CHANGES README examples
%{python3_sitearch}/*
* 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 %changelog
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Feb 08 2022 Miro Hrončok <mhroncok@redhat.com> - 5.4.1-6
* 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, - Remove some outdated Obsoletes and Provides,
but keep providing python3-yaml and python3-PyYAML for users but keep providing python3-yaml and python3-PyYAML for users
- Related: rhbz#1990421
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-2 * Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 5.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - Add automatically generated Obsoletes tag with the python39- prefix
for smoother upgrade from RHEL8
* Wed Oct 13 2021 John Eckersberg <jeckersb@redhat.com> - 6.0-1 - Related: rhbz#1990421
- New upstream release 6.0
* Mon Oct 4 2021 John Eckersberg <jeckersb@redhat.com> - 6.0-0.1.b1 * Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 5.4.1-4
- New upstream beta release 6.0b1 (rhbz#2010501) - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.1-4 * Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 5.4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* 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 * Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
@ -417,5 +387,3 @@ sed -i 's/Cython<3.0/Cython/' pyproject.toml
* Mon Dec 17 2007 John Eckersberg <jeckersb@redhat.com> - 3.05-1 * Mon Dec 17 2007 John Eckersberg <jeckersb@redhat.com> - 3.05-1
- Initial packaging for Fedora - Initial packaging for Fedora
## END: Generated by rpmautospec

Loading…
Cancel
Save