Files
python-yq/python-yq.spec
Tomáš Chvátal 1d1c4ffdc3 Accepting request 689244 from home:pgajdos
- Run test suite at least for Python 3

- version update to 2.7.2
  * xq: Introduce –xml-dtd and –xml-root.
  * TOML support is optional and experimental
  * TOML support with the tq executable entry point.
  * Disallow argparse abbreviated options.
  * Parse unrecognized tags instead of dropping them.
  * Ignore unrecognized YAML tags instead of crashing.
  * xq -x: Raise understandable error on non-dict conversion failure.
  * Support XML parsing with xmltodict.
  * Fix for the –from-file/-f argument: Re-route jq_filter to files
    when using –from-file.
  * Parse and pass multiple positional-consuming jq args.
  * Support jq arguments that consume subsequent positionals.
  * Support bare YAML dates and times.
- package LICENSE

OBS-URL: https://build.opensuse.org/request/show/689244
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-yq?expand=0&rev=5
2019-03-28 08:45:42 +00:00

82 lines
2.4 KiB
RPMSpec

#
# spec file for package python-yq
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-yq
Version: 2.7.2
Release: 0
Summary: Command-line YAML processor - jq wrapper for YAML documents
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/kislyuk/yq
Source: https://files.pythonhosted.org/packages/source/y/yq/yq-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module PyYAML >= 3.11}
BuildRequires: %{python_module toml >= 0.9.4}
BuildRequires: %{python_module xmltodict >= 0.11.0}
BuildRequires: jq
# /SECTION
Requires: python-PyYAML >= 3.11
Requires: python-setuptools
Requires: python-toml >= 0.9.4
Requires: python-xmltodict >= 0.11.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
yq: Command-line YAML processor - jq wrapper for YAML documents
%prep
%setup -q -n yq-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/yq
%python_clone -a %{buildroot}%{_bindir}/xq
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative yq
%python_install_alternative xq
%postun
%python_uninstall_alternative yq
%python_uninstall_alternative xq
%check
PYTHONPATH=%{buildroot}%{python3_sitelib} python3 test/test.py -v
%files %{python_files}
%defattr(-,root,root,-)
%license LICENSE
%doc README.rst
%python_alternative %{_bindir}/yq
%python_alternative %{_bindir}/xq
%{python_sitelib}/*
%changelog