## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global commit 2402f9b7fb7c15d01398cdd5f58f124a920517b2 Name: python-ruamel-yaml-clib Version: 0.2.12 Release: %autorelease Summary: C version of reader, parser and emitter for ruamel.yaml derived from libyaml # SPDX License: MIT URL: https://sourceforge.net/projects/ruamel-yaml-clib Source0: https://sourceforge.net/code-snapshots/hg/r/ru/ruamel-yaml-clib/code/ruamel-yaml-clib-code-%{commit}.zip Patch: unbundle-libyaml.patch BuildRequires: gcc %global _description %{expand: It is the C based reader/scanner and emitter for ruamel.yaml.} %description %{_description} %package -n python3-ruamel-yaml-clib Summary: %{summary} BuildRequires: python3-devel BuildRequires: %{py3_dist Cython} BuildRequires: libyaml-devel # Unfortunately, the circular dependency is intentional; the clib extension # packaged here imports from ruamel.yaml, which in turn uses the extension for # performance. BuildRequires: python3-ruamel-yaml Requires: python3-ruamel-yaml %py_provides python3-ruamel.yaml.clib %description -n python3-ruamel-yaml-clib %{_description} %prep %autosetup -p1 -n ruamel-yaml-clib-code-%{commit} # Fix wrong return type for strlen() sed -i 's/int strlen/size_t strlen/' _ruamel_yaml.pxd # Remove bundled libyaml source files rm -fv api.c dumper.c emitter.c loader.c parser.c reader.c scanner.c writer.c config.h yaml_private.h yaml.h # Force regenerating C files from Cython sources rm -v $(grep -rl '/\* Generated by Cython') cp -p '%{SOURCE1}' . %generate_buildrequires # Upstream has a tox.ini, but it is for a build-and-install check, not a test # suite, so we do not use it to generate dependencies (-t). %pyproject_buildrequires %build # cython refuses to cythonize a file in a directory that cannot be a Python # module ¯\_(ツ)_/¯ # # Top-level structure seems to be incompatible with Cython 0.29.34 # ('ruamel-yaml-clib-code._ruamel_yaml' is not a valid module name) # https://sourceforge.net/p/ruamel-yaml-clib/tickets/14/ mkdir ruamel.yaml.clib mv *.pyx ruamel.yaml.clib cythonize -j${RPM_BUILD_NCPUS} -3 ruamel.yaml.clib/*.pyx mv ruamel.yaml.clib/* . rmdir ruamel.yaml.clib %pyproject_wheel %install %pyproject_install %pyproject_save_files _ruamel_yaml %check %py3_check_import _ruamel_yaml %files -n python3-ruamel-yaml-clib -f %{pyproject_files} # pyproject_files handles LICENSE; verify with “rpm -qL -p …” # Remove the following once we no longer have a separate LICENSE-libyaml: %license LICENSE LICENSE-libyaml %doc README.md %changelog ## START: Generated by rpmautospec * Wed Nov 27 2024 Ondrej Mosnáček - 0.2.12-2 - Unbundle libyaml * Wed Nov 27 2024 Ondrej Mosnáček - 0.2.12-1 - Update to version 0.2.12 (fedora#2242001) * Fri Jul 19 2024 Fedora Release Engineering - 0.2.7-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 0.2.7-7 - Rebuilt for Python 3.13 * Thu Feb 01 2024 Florian Weimer - 0.2.7-6 - Update fix-typecasts-s390x.patch for GCC 14 compatibility (#2042422) * Fri Jan 26 2024 Fedora Release Engineering - 0.2.7-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.2.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 0.2.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jun 14 2023 Python Maint - 0.2.7-2 - Rebuilt for Python 3.12 * Wed May 03 2023 Benjamin A. Beasley - 0.2.7-1 - Update to 0.2.7 * Wed May 03 2023 Benjamin A. Beasley - 0.2.6-5 - Confirm License is SPDX MIT - Reduce macro indirection, etc. - Drop unused manual runtime dependency on setuptools - Add a note about the circular dependency with ruamel.yaml - Stop numbering sources and patches - Update URL (close RHBZ#1840610) - Add an import-only “smoke test” - Properly handle libyaml bundling - Port to pyproject-rpm-macros (“new Python guidelines”) - Add a link to the upstream issue for the Cython workaround * Fri Jan 20 2023 Fedora Release Engineering - 0.2.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.2.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 0.2.6-2 - Rebuilt for Python 3.11 * Tue May 10 2022 Jakub Čajka - 0.2.6-1 - Update to 0.2.6 - Fix for type demotion issues on s390x - Resolves: BZ#2042422 * Fri Jan 21 2022 Fedora Release Engineering - 0.1.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.1.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.1.2-7 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.1.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Nov 12 2020 Miro Hrončok - 0.1.2-5 - Force regenerating C files from Cython sources - Require python3-ruamel-yaml * Wed Jul 29 2020 Fedora Release Engineering - 0.1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.1.2-3 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 0.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Aug 30 2019 Chandan Kumar - 0.1.2-1 - Initial package ## END: Generated by rpmautospec