Name:           PyYAML
Version:        6.0
Release:        1%{?_dist_release}
Summary:        YAML parser and emitter for Python
Group:          programming
Vendor:         Project Vine
Distribution:   Vine Linux

License:        MIT
URL:            https://github.com/yaml/pyyaml
Source0:        https://github.com/yaml/pyyaml/archive/%{version}.tar.gz#/pyyaml-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:  libyaml-devel
BuildRequires:  python-rpm-macros
BuildRequires:  python3-devel, python3-setuptools, python3-rpm-macros
BuildRequires:  python3-Cython

%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 python3-pyyaml
Summary:        %summary
Group:          programming
Provides:       python3-yaml = %{version}-%{release}
Provides:       python3-yaml%{?_isa} = %{version}-%{release}
%{?python_provide:%python_provide python3-pyyaml}
# Remove before F31
Provides:       python3-PyYAML = %{version}-%{release}
Provides:       python3-PyYAML%{?_isa} = %{version}-%{release}

%description -n python3-pyyaml
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.


%debug_package


%prep
%setup -q -n pyyaml-%{version}
chmod a-x examples/yaml-highlight/yaml_hl.py

# remove pre-generated file
rm -f ext/_yaml.c


%build
%set_build_flags
%pip3_build_wheel


%install
rm -rf $RPM_BUILD_ROOT
%pip3_install_wheel


%if 0
%check
%{__python3} setup.py test
%endif


%clean
rm -rf $RPM_BUILD_ROOT


%files -n python3-pyyaml
%license LICENSE
%doc CHANGES README examples
%{python3_sitearch}/*


%changelog
* Fri Oct 28 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.0-1
- new upstream release.
- dropped python2 support.

* Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.1-1
- new upstream release.

* Wed Oct 30 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.1.2-1
- new upstream release.
- added python3 support.

* Mon Mar 12 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> 3.10-3
- rebuilt with libyaml-0.1.4

* Sat Feb 18 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10-2
- rebuild with python-2.7.2

* Sat Jan 28 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> 3.10-1
- new upstream release

* Sun Feb 7 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 3.09-1
- new upstream release

* Thu Jun 11 2009 Shu KONNO <owa@bg.wakwak.com> 3.08-2
- s/python_sitelib/python_sitearch/

* Wed Jun 10 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.08-1
- initial build for Vine Linux

* Tue Mar 3 2009 John Eckersberg <jeckersb@redhat.com> - 3.08-4
- Correction, change libyaml to libyaml-devel in BuildRequires

* Mon Mar 2 2009 John Eckersberg <jeckersb@redhat.com> - 3.08-3
- Add libyaml to BuildRequires

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.08-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Feb 18 2009 John Eckersberg <jeckersb@redhat.com> - 3.08-1
- New upstream release

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 3.06-2
- Rebuild for Python 2.6

* Fri Oct 24 2008 John Eckersberg <jeckersb@redhat.com> - 3.06-1
- New upstream release

* Wed Jan 02 2008 John Eckersberg <jeckersb@redhat.com> - 3.05-2
- Remove explicit dependency on python >= 2.3
- Remove executable on example script in docs

* Mon Dec 17 2007 John Eckersberg <jeckersb@redhat.com> - 3.05-1
- Initial packaging for Fedora
