diff --git a/.gitignore b/.gitignore index ae97dae..1c4a4b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /ruamel.yaml.clib-0.1.2.tar.gz +/ruamel-yaml-clib-code-955989c1f022b95ca1f92bf0abd761ef8aa0b940.zip diff --git a/python-ruamel-yaml-clib.spec b/python-ruamel-yaml-clib.spec index 24f80b4..c76c63d 100644 --- a/python-ruamel-yaml-clib.spec +++ b/python-ruamel-yaml-clib.spec @@ -1,14 +1,17 @@ %global pypi_name ruamel.yaml.clib %global pname ruamel-yaml-clib +# This means version 0.1.2: +%global hash 955989c1f022b95ca1f92bf0abd761ef8aa0b940 + Name: python-%{pname} Version: 0.1.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: C version of reader, parser and emitter for ruamel.yaml derived from libyaml License: MIT URL: https://bitbucket.org/ruamel/yaml.clib -Source0: %{pypi_source} +Source0: https://sourceforge.net/code-snapshots/hg/r/ru/ruamel-yaml-clib/code/ruamel-yaml-clib-code-%{hash}.zip BuildRequires: gcc BuildRequires: libyaml-devel @@ -20,6 +23,7 @@ It is the C based reader/scanner and emitter for ruamel.yaml. Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3-Cython Requires: python3-setuptools @@ -27,9 +31,18 @@ Requires: python3-setuptools It is the C based reader/scanner and emitter for ruamel.yaml. %prep -%autosetup -n %{pypi_name}-%{version} +%autosetup -n %{pname}-code-%{hash} +# Force regenerating C files from Cython sources +rm -v $(grep -rl '/\* Generated by Cython') %build +# cython refuses to cythonize a file in a directory that cannot be a Python module ¯\_(ツ)_/¯ +mkdir ruamel.yaml.clib +mv *.pyx ruamel.yaml.clib +cythonize ruamel.yaml.clib/*.pyx +mv ruamel.yaml.clib/* . +rmdir ruamel.yaml.clib + %py3_build %install @@ -42,6 +55,9 @@ It is the C based reader/scanner and emitter for ruamel.yaml. %{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Thu Nov 12 2020 Miro Hrončok - 0.1.2-5 +- Force regenerating C files from Cython sources + * Wed Jul 29 2020 Fedora Release Engineering - 0.1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 7fa9a8f..c4c4d35 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruamel.yaml.clib-0.1.2.tar.gz) = a5c84b1ff10dde5a467fa16f1a3bd5ea174c39251364429ac3d63fa94bc728571316a8f418bf9a50f441096d59580c3e2e49c3ecf9d5961d650d61440b57f461 +SHA512 (ruamel-yaml-clib-code-955989c1f022b95ca1f92bf0abd761ef8aa0b940.zip) = a2032af5c677c5ebadd8c8289bd0fa926cbb07e0a289d95893dc7f0e38d6387cf3798046727627c6574ede84828054eabf6262b4f5a490072e8902c85c6c6b06