f0fb35f
# Python 2 removal, RHBZ#1775075
fdae8aa
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
f0fb35f
%bcond_with     python2
6797a27
%else
6797a27
%bcond_without  python2
6797a27
%endif
8b822c0
74ec1ce
Name:           PyYAML
ba402f6
Version:        5.4.1
665ad9c
Release:        1%{?dist}
665ad9c
%global uversion %{version}
74ec1ce
Summary:        YAML parser and emitter for Python
74ec1ce
74ec1ce
License:        MIT
00c98a1
URL:            https://github.com/yaml/pyyaml
6cf2444
Source0:        https://github.com/yaml/pyyaml/archive/%{uversion}.tar.gz
8dad75a
94a5501
BuildRequires:  gcc
72978d4
BuildRequires:  libyaml-devel
8dad75a
8b822c0
%if %{with python2}
8dad75a
BuildRequires:  python2-devel
8dad75a
BuildRequires:  python2-setuptools
8b822c0
%endif
8dad75a
8dad75a
BuildRequires:  python3-devel
8dad75a
BuildRequires:  python3-setuptools
8dad75a
BuildRequires:  python3-Cython
8dad75a
c249734
c877a9f
%global _description\
c877a9f
YAML is a data serialization format designed for human readability and\
c877a9f
interaction with scripting languages.  PyYAML is a YAML parser and\
c877a9f
emitter for Python.\
c877a9f
\
c877a9f
PyYAML features a complete YAML 1.1 parser, Unicode support, pickle\
c877a9f
support, capable extension API, and sensible error messages.  PyYAML\
c877a9f
supports standard YAML tags and provides Python-specific tags that\
c877a9f
allow to represent an arbitrary Python object.\
c877a9f
\
c877a9f
PyYAML is applicable for a broad range of tasks from complex\
ff70d17
configuration files to object serialization and persistence.
74ec1ce
c877a9f
%description %_description
74ec1ce
8dad75a
8b822c0
%if %{with python2}
c877a9f
%package -n python2-pyyaml
8dad75a
Summary:        %summary
c877a9f
Provides:       python-yaml = %{version}-%{release}
c877a9f
Provides:       python-yaml%{?_isa} = %{version}-%{release}
c877a9f
Provides:       python2-yaml = %{version}-%{release}
c877a9f
Provides:       python2-yaml%{?_isa} = %{version}-%{release}
36361a9
Provides:       PyYAML = %{version}-%{release}
36361a9
Provides:       PyYAML%{?_isa} = %{version}-%{release}
c877a9f
%{?python_provide:%python_provide python2-pyyaml}
c877a9f
c877a9f
%description -n python2-pyyaml %_description
8b822c0
%endif
50265f1
8dad75a
%package -n python3-pyyaml
8dad75a
Summary:        %summary
8dad75a
Provides:       python3-yaml = %{version}-%{release}
8dad75a
Provides:       python3-yaml%{?_isa} = %{version}-%{release}
8dad75a
%{?python_provide:%python_provide python3-pyyaml}
8dad75a
# Remove before F31
8dad75a
Provides:       python3-PyYAML = %{version}-%{release}
8dad75a
Provides:       python3-PyYAML%{?_isa} = %{version}-%{release}
8dad75a
Obsoletes:      python3-PyYAML < 4.1-5
50265f1
8dad75a
%description -n python3-pyyaml %_description
50265f1
50265f1
74ec1ce
%prep
e9684db
%setup -q -n pyyaml-%{uversion}
78db20d
chmod a-x examples/yaml-highlight/yaml_hl.py
74ec1ce
72978d4
# remove pre-generated file
72978d4
rm -rf ext/_yaml.c
50265f1
74ec1ce
74ec1ce
%build
8dad75a
%py3_build
72978d4
8b822c0
%if %{with python2}
2b84981
# py2_build reuses Cython output from py3_build
2b84981
%py2_build
8b822c0
%endif
2b84981
74ec1ce
74ec1ce
%install
8b822c0
%if %{with python2}
8dad75a
%py2_install
8b822c0
%endif
8dad75a
%py3_install
50265f1
74ec1ce
5609e58
%check
8b822c0
%if %{with python2}
8dad75a
%{__python2} setup.py test
8b822c0
%endif
5609e58
%{__python3} setup.py test
5609e58
5609e58
8b822c0
%if %{with python2}
c877a9f
%files -n python2-pyyaml
d5e73fe
%license LICENSE
00c98a1
%doc CHANGES README examples
8dad75a
%{python2_sitearch}/*
8b822c0
%endif
74ec1ce
8dad75a
%files -n python3-pyyaml
d5e73fe
%license LICENSE
00c98a1
%doc CHANGES README examples
50265f1
%{python3_sitearch}/*
50265f1
74ec1ce
74ec1ce
%changelog
ba402f6
* Thu Jan 21 2021 John Eckersberg <jeckersb@redhat.com> - 5.4.1-1
ba402f6
- New upstream release 5.4.1 (rhbz#1918523)
ba402f6
665ad9c
* Wed Jan 20 2021 John Eckersberg <jeckersb@redhat.com> - 5.4-1
665ad9c
- New upstream release 5.4
665ad9c
- Fixes CVE-2020-14343
665ad9c
eff010b
* Fri Jan 15 2021 John Eckersberg <jeckersb@redhat.com> - 5.4-0.1.b2
eff010b
- New upstream beta release 5.4b2 (rhbz#1916496)
eff010b
e9684db
* Thu Jan 14 2021 John Eckersberg <jeckersb@redhat.com> - 5.4-0.1.b1
e9684db
- New upstream beta release 5.4b1 (rhbz#1916034)
e9684db
fdae8aa
* Mon Nov 23 2020 Miro Hrončok <mhroncok@redhat.com> - 5.3.1-5
fdae8aa
- Disable Python 2 build on RHEL 9+
fdae8aa
402b3d5
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-4
402b3d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
402b3d5
fb49c4f
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 5.3.1-3
fb49c4f
- Rebuilt for Python 3.9
fb49c4f
9abd7fe
* Mon May 18 2020 John Eckersberg <eck@redhat.com> - 5.3.1-2
9abd7fe
- Fix fedora conditional macro (rhbz#1836656)
9abd7fe
bd20372
* Thu Mar 19 2020 John Eckersberg <eck@redhat.com> - 5.3.1-1
bd20372
- New upstream release 5.3.1 (rhbz#1814882)
bd20372
- Fixes CVE-2020-1747 (rhbz#1807367,1809011)
bd20372
36361a9
* Tue Mar 10 2020 Kalev Lember <klember@redhat.com> - 5.3-4
36361a9
- Add back PyYAML provides on F31 and older
36361a9
6797a27
* Mon Mar  2 2020 John Eckersberg <eck@redhat.com> - 5.3-3
6797a27
- Fix python2 on Fedora < 32 (rhbz#1808812)
6797a27
fcc6c57
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.3-2
fcc6c57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
fcc6c57
e34ab79
* Mon Jan  6 2020 John Eckersberg <eck@redhat.com> - 5.3-1
e34ab79
- New upstream release 5.3
e34ab79
00b2e2f
* Tue Dec  3 2019 John Eckersberg <eck@redhat.com> - 5.2-1
00b2e2f
- New upstream release 5.2
00b2e2f
f0fb35f
* Fri Nov 22 2019 John Eckersberg <eck@redhat.com> - 5.1.2-4
f0fb35f
- Build without python2 by default (rhbz#1775075)
f0fb35f
8cc459b
* Thu Sep 19 2019 Miro Hrončok <mhroncok@redhat.com> - 5.1.2-3
8cc459b
- Stop providing PyYAML from python2-pyyaml, Python now means Python 3
8cc459b
def428a
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 5.1.2-2
def428a
- Rebuilt for Python 3.8
def428a
c9806f7
* Wed Jul 31 2019 John Eckersberg <eck@redhat.com> - 5.1.2-1
c9806f7
- New upstream release 5.1.2
c9806f7
7e60036
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-3
7e60036
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7e60036
2b84981
* Mon Jul 15 2019 Petr Viktorin <pviktori@redhat.com> - 5.1.1-2
2b84981
- Remove build dependency on python2-Cython
2b84981
e2295c1
* Fri Jun  7 2019 John Eckersberg <eck@redhat.com> - 5.1.1-1
e2295c1
- New upstream release 5.1.1 (rhbz#1718110)
e2295c1
df56c4d
* Wed Mar 13 2019 John Eckersberg <eck@redhat.com> - 5.1-1
df56c4d
- New upstream release 5.1 (rhbz#1688414)
df56c4d
- Fixes CVE-2017-18342 (rhbz#1595744)
df56c4d
2d81f03
* Fri Mar  8 2019 John Eckersberg <eck@redhat.com> - 5.1-0.1.b6
2d81f03
- New upstream beta release 5.1b6 (rhbz#1686643)
2d81f03
118df16
* Thu Feb 28 2019 John Eckersberg <eck@redhat.com> - 5.1-0.1.b3
118df16
- New upstream beta release 5.1b3 (rhbz#1683884)
118df16
ff70d17
* Mon Feb 25 2019 John Eckersberg <eck@redhat.com> - 5.1-0.1.b1
ff70d17
- New upstream beta release 5.1b1 (rhbz#1680457)
ff70d17
- Typo fix (rhbz#1680463)
ff70d17
9df8eb6
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-0.2.b4
9df8eb6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
9df8eb6
f347cc1
* Fri Jul 13 2018 John Eckersberg <eck@redhat.com> - 4.2-0.1.b4
94a5501
- New upstream beta release 4.2b4
94a5501
- Replaces 4.1 which was retracted upstream
94a5501
  See https://mail.python.org/pipermail/python-announce-list/2018-June/011977.html
94a5501
- Add BuildRequires for gcc
94a5501
  See https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
94a5501
8dad75a
* Thu Jul 12 2018 Miro Hrončok <mhroncok@redhat.com> - 4.1-5
8dad75a
- Rename python3-PyYAML to python3-pyyaml
8dad75a
- Modernize spec
8dad75a
- Fix python2 invocation
8dad75a
bcbfc05
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-4
bcbfc05
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
bcbfc05
08fe234
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 4.1-3
08fe234
- Rebuilt for Python 3.7
08fe234
e993143
* Mon Jul 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.1-2
e993143
- Rebuilt for Python 3.7
e993143
00c98a1
* Wed Jun 27 2018 John Eckersberg <eck@redhat.com> - 4.1-1
00c98a1
- New upstream release 4.1
00c98a1
fa3f73a
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 3.12-11
fa3f73a
- Rebuilt for Python 3.7
fa3f73a
cd3566f
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.12-10
cd3566f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
cd3566f
fe5c6e1
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 3.12-9
fe5c6e1
- Fix ambiguous Python 2 dependency declarations
fe5c6e1
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
fe5c6e1
60bf96a
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 3.12-8
60bf96a
- Cleanup spec file conditionals
60bf96a
3e1f78f
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.12-7
3e1f78f
- Add Provides for the old name without %%_isa
3e1f78f
c877a9f
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.12-6
c877a9f
- Python 2 binary package renamed to python2-pyyaml
c877a9f
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
c877a9f
2d121d6
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.12-5
2d121d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
2d121d6
c73b431
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.12-4
c73b431
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c73b431
f17d9a7
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.12-3
f17d9a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f17d9a7
589aeb0
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.12-2
589aeb0
- Rebuild for Python 3.6
589aeb0
e0e71dd
* Mon Aug 29 2016 John Eckersberg <eck@redhat.com> - 3.12-1
e0e71dd
- New upstream release 3.12 (RHBZ#1371150)
e0e71dd
2edc390
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11-13
2edc390
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2edc390
9b88a76
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-12
9b88a76
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9b88a76
6c051be
* Tue Dec  8 2015 John Eckersberg <eck@redhat.com> - 3.11-11
6c051be
- Add provides for python3-yaml (RHBZ#1288807)
6c051be
Robert Kuska 4dac1c6
* Tue Nov 03 2015 Robert Kuska <rkuska@redhat.com> - 3.11-10
Robert Kuska 4dac1c6
- Rebuilt for Python3.5 rebuild
Robert Kuska 4dac1c6
d1fc70f
* Fri Jul 17 2015 John Eckersberg <eck@redhat.com> - 3.11-9
d1fc70f
- Add provides for python2-yaml (RHBZ#1241678)
d1fc70f
58939d7
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11-8
58939d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
58939d7
c249734
* Mon Mar 23 2015 John Eckersberg <eck@redhat.com> - 3.11-7
c249734
- Add patch for CVE-2014-9130 (bug 1204829)
c249734
72978d4
* Mon Sep 15 2014 Jakub Čajka <jcajka@redhat.com> - 3.11-6
72978d4
- fixed typecast issues using debian patch(int->size_t)(BZ#1140189)
72978d4
- spec file cleanup
72978d4
21632c5
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11-5
21632c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
21632c5
d5e73fe
* Mon Aug  4 2014 Tom Callaway <spot@fedoraproject.org> - 3.11-4
d5e73fe
- fix license handling
d5e73fe
6247260
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11-3
6247260
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
6247260
24e6324
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 3.11-2
24e6324
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
24e6324
9448c69
* Mon Apr 21 2014 John Eckersberg <jeckersb@redhat.com> - 3.11-1
9448c69
- New upstream release 3.11 (BZ#1081521)
9448c69
5609e58
* Thu Aug  8 2013 John Eckersberg <jeckersb@redhat.com> - 3.10-9
5609e58
- Add check section and run test suite
5609e58
835acb4
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10-8
835acb4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
835acb4
a33ccb5
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10-7
a33ccb5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a33ccb5
ef573ba
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 3.10-6
ef573ba
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
ef573ba
5cafbe8
* Wed Aug  1 2012 David Malcolm <dmalcolm@redhat.com> - 3.10-5
5cafbe8
- remove rhel logic from with_python3 conditional
5cafbe8
f4e4e28
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10-4
f4e4e28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f4e4e28
927b2d9
* Fri Apr 27 2012 John Eckersberg <jeckersb@redhat.com> - 3.10-3
927b2d9
- Add Provides for python-yaml (BZ#740390)
927b2d9
5f596a7
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10-2
5f596a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5f596a7
6272371
* Thu Jun 23 2011 John Eckersberg <jeckersb@redhat.com> - 3.10-1
6272371
- New upstream release 3.10
6272371
03e2aa6
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.09-8
03e2aa6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
03e2aa6
50265f1
* Wed Feb  2 2011 John Eckersberg <jeckersb@redhat.com> - 3.09-7
50265f1
- Add support to build for python 3
50265f1
b2d86cc
* Tue Jul 27 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 3.09-6
9c0bf5e
- Bump release number for upgrade path
9c0bf5e
2454497
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.09-3
2454497
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
2454497
9240021
* Fri Oct 02 2009 John Eckersberg <jeckersb@redhat.com> - 3.09-1
9240021
- New upstream release 3.09
9240021
bbb12f2
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.08-6
bbb12f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
bbb12f2
78db20d
* Wed Jul 22 2009 - John Eckersberg <jeckersb@redhat.com> - 3.08-5
78db20d
- Minor tweaks to spec file aligning with latest Fedora packaging guidelines
78db20d
- Enforce inclusion of libyaml in build with --with-libyaml option to setup.py
78db20d
- Deliver to %%{python_sitearch} instead of %%{python_sitelib} due to _yaml.so
78db20d
- Thanks to Gareth Armstrong <gareth.armstrong@hp.com>
78db20d
3a057b6
* Tue Mar 3 2009 John Eckersberg <jeckersb@redhat.com> - 3.08-4
3a057b6
- Correction, change libyaml to libyaml-devel in BuildRequires
3a057b6
e452fff
* Mon Mar 2 2009 John Eckersberg <jeckersb@redhat.com> - 3.08-3
e452fff
- Add libyaml to BuildRequires
e452fff
94d52e0
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.08-2
94d52e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
94d52e0
7a85b8d
* Wed Feb 18 2009 John Eckersberg <jeckersb@redhat.com> - 3.08-1
7a85b8d
- New upstream release
7a85b8d
5b4754b
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 3.06-2
5b4754b
- Rebuild for Python 2.6
5b4754b
b8e0d83
* Fri Oct 24 2008 John Eckersberg <jeckersb@redhat.com> - 3.06-1
b8e0d83
- New upstream release
b8e0d83
74ec1ce
* Wed Jan 02 2008 John Eckersberg <jeckersb@redhat.com> - 3.05-2
74ec1ce
- Remove explicit dependency on python >= 2.3
74ec1ce
- Remove executable on example script in docs
74ec1ce
74ec1ce
* Mon Dec 17 2007 John Eckersberg <jeckersb@redhat.com> - 3.05-1
74ec1ce
- Initial packaging for Fedora