Blame SPECS/python-ruamel-yaml-clib.spec

2b9c09
%global pypi_name ruamel.yaml.clib
2b9c09
%global pname ruamel-yaml-clib
2b9c09
2b9c09
# This means version 0.1.2:
2b9c09
%global hash 955989c1f022b95ca1f92bf0abd761ef8aa0b940
2b9c09
2b9c09
Name:           python-%{pname}
2b9c09
Version:        0.1.2
2b9c09
Release:        8%{?dist}.1
2b9c09
Summary:        C version of reader, parser and emitter for ruamel.yaml derived from libyaml
2b9c09
2b9c09
License:        MIT
2b9c09
URL:            https://bitbucket.org/ruamel/yaml.clib
2b9c09
Source0:        https://sourceforge.net/code-snapshots/hg/r/ru/ruamel-yaml-clib/code/ruamel-yaml-clib-code-%{hash}.zip
2b9c09
2b9c09
BuildRequires:  gcc
2b9c09
BuildRequires:  libyaml-devel
2b9c09
2b9c09
%description
2b9c09
It is the C based reader/scanner and emitter for ruamel.yaml.
2b9c09
2b9c09
%package -n     python3-%{pname}
2b9c09
Summary:        %{summary}
2b9c09
BuildRequires:  python3-devel
2b9c09
BuildRequires:  python3-setuptools
2b9c09
BuildRequires:  python3-Cython
2b9c09
2b9c09
Requires:       python3-setuptools
2b9c09
Requires:       python3-ruamel-yaml
2b9c09
2b9c09
%description -n python3-%{pname}
2b9c09
It is the C based reader/scanner and emitter for ruamel.yaml.
2b9c09
2b9c09
%prep
2b9c09
%autosetup -n %{pname}-code-%{hash}
2b9c09
# Force regenerating C files from Cython sources
2b9c09
rm -v $(grep -rl '/\* Generated by Cython')
2b9c09
2b9c09
%build
2b9c09
# cython refuses to cythonize a file in a directory that cannot be a Python module ¯\_(ツ)_/¯
2b9c09
mkdir ruamel.yaml.clib
2b9c09
mv *.pyx ruamel.yaml.clib
2b9c09
cythonize ruamel.yaml.clib/*.pyx
2b9c09
mv ruamel.yaml.clib/* .
2b9c09
rmdir ruamel.yaml.clib
2b9c09
2b9c09
%py3_build
2b9c09
2b9c09
%install
2b9c09
%{__python3} setup.py install --single-version-externally-managed --skip-build --root $RPM_BUILD_ROOT
2b9c09
2b9c09
%files -n python3-%{pname}
2b9c09
%license LICENSE
2b9c09
%doc README.rst
2b9c09
%{python3_sitearch}/_ruamel_yaml.cpython-*
2b9c09
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
2b9c09
2b9c09
%changelog
2b9c09
* Thu Sep 30 2021 Akira TAGOH <tagoh@redhat.com> - 0.1.2-8.1
2b9c09
- Add CI test.
2b9c09
  Resolves: rhbz#2009159
2b9c09
2b9c09
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.1.2-8
2b9c09
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
2b9c09
  Related: rhbz#1991688
2b9c09
2b9c09
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.1.2-7
2b9c09
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
2b9c09
2b9c09
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-6
2b9c09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2b9c09
2b9c09
* Thu Nov 12 2020 Miro Hrončok <mhroncok@redhat.com> - 0.1.2-5
2b9c09
- Force regenerating C files from Cython sources
2b9c09
- Require python3-ruamel-yaml
2b9c09
2b9c09
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-4
2b9c09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2b9c09
2b9c09
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.1.2-3
2b9c09
- Rebuilt for Python 3.9
2b9c09
2b9c09
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-2
2b9c09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
2b9c09
2b9c09
* Fri Aug 30 2019 Chandan Kumar <raukadah@gmail.com> - 0.1.2-1
2b9c09
- Initial package