## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 15; 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 # Fedora and OpenSUSE has alternative Go based tool (rhbz#2276522): # https://github.com/mikefarah/yq Name: python-yq Version: 3.4.3 Release: %autorelease Summary: Command-line YAML/XML/TOML processor - jq wrapper License: Apache-2.0 URL: https://github.com/kislyuk/yq VCS: git:%{url} Source0: %{pypi_source yq} BuildArch: noarch BuildRequires: python3-devel BuildRequires: jq %global _description %{expand: jq wrapper for YAML, XML, TOML documents. yq takes YAML input, converts it to JSON, and pipes it to jq. By default, no conversion of jq output is done. yq also supports XML, which transcodes XML to JSON using xmltodict and pipes it to jq. yq supports TOML as well, which uses the tomlkit library to transcode TOML to JSON, then pipes it to jq.} %description %{_description} %package -n python3-yq Summary: %{summary} %{?python_provide:%python_provide python3-yq} Requires: jq %description -n python3-yq %{_description} Provides yqp, xqp and tomlq commands and python yq module. %prep %autosetup -p1 -n yq-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l yq # xq command is already taken # Already packaged separately in xq package # https://github.com/sibprogrammer/xq = https://src.fedoraproject.org/rpms/xq mv %{buildroot}%{_bindir}/{xq,xqp} # yq conflicts with Go project # https://github.com/mikefarah/yq = https://src.fedoraproject.org/rpms/yq mv %{buildroot}%{_bindir}/{yq,yqp} # Suffix p means python variant, alternative to Golang based tools # Just single letter to make it still short %check %{python3} test/test.py %files -n python3-yq -f %{pyproject_files} %license LICENSE %doc README.rst %{_bindir}/yqp %{_bindir}/tomlq %{_bindir}/xqp %changelog ## START: Generated by rpmautospec * Fri Aug 29 2025 Petr Menšík - 3.4.3-15 - Remove confusing comment about test run * Fri Aug 29 2025 Petr Menšík - 3.4.3-14 - Remove alternative support altoghether * Fri Aug 29 2025 Petr Menšík - 3.4.3-13 - Apply some changes from review * Mon Jun 17 2024 Petr Menšík - 3.4.3-12 - Include provided commands in pkg description * Mon Jun 17 2024 Petr Menšík - 3.4.3-11 - Rename compat to alt * Mon Jun 17 2024 Petr Menšík - 3.4.3-10 - Move yq binary to separate subpackage * Tue Jun 11 2024 Petr Menšík - 3.4.3-9 - Change tomlkit dependency only on f39 * Tue Jun 11 2024 Petr Menšík - 3.4.3-8 - Allow build on f39 * Tue Jun 11 2024 Petr Menšík - 3.4.3-7 - Basic support for alternatives * Tue Jun 11 2024 Petr Menšík - 3.4.3-6 - Update description from the project itself. * Tue Jun 11 2024 Petr Menšík - 3.4.3-5 - Work also on Fedora 39 * Tue Jun 11 2024 Petr Menšík - 3.4.3-4 - Make alternative name to xq * Tue Jun 11 2024 Petr Menšík - 3.4.3-3 - Rename xq to xqp * Mon Jun 10 2024 Petr Menšík - 3.4.3-2 - Remove customizable python version for better readability * Mon Jun 10 2024 Petr Menšík - 3.4.3-1 - Update description and use latest version * Mon Jun 10 2024 Petr Menšík - 3.2.3-1 - Initial review * Sat Apr 28 2018 Andrey Kislyuk - RPMAUTOSPEC: unresolvable merge ## END: Generated by rpmautospec