1
0
Files
python-yamllint/python-yamllint.spec
Dirk Mueller 21011afcb1 - update to 1.35.1:
* Restore ignoration of files passed as command-line arguments
  * Revert API change from version 1.35.0
  * Fix failure on broken symlinks that should be ignored
  * API change: linter.run(stream, config) doesn't filter files
    anymore
  * Docs: Restore official Read the Docs theme
  * Config: validate ignore-from-file inside rules
  * Rule quoted-strings: fix only-when-needed in flow maps and
    sequences
  * Rule key-duplicates: add forbid-duplicated-merge-keys option
  * Rule quoted-strings: add check-keys option
  * Docs: add GitLab CI example
  * Rule truthy: adapt forbidden values based on YAML version

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-yamllint?expand=0&rev=40
2024-03-16 14:42:15 +00:00

83 lines
2.5 KiB
RPMSpec

#
# spec file for package python-yamllint
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
%{?sle15_python_module_pythons}
Name: python-yamllint
Version: 1.35.1
Release: 0
Summary: A linter for YAML files
License: GPL-3.0-only
Group: Development/Languages/Python
URL: https://github.com/adrienverge/yamllint
Source: https://files.pythonhosted.org/packages/source/y/yamllint/yamllint-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-PyYAML
Requires: python-pathspec >= 0.5.3
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module pathspec >= 0.5.3}
# /SECTION
%python_subpackages
%description
A linter for YAML files.
YAMLlint does not only check for syntax validity, but for weirdnesses like key
repetition and cosmetic problems such as lines length, trailing spaces,
indentation, etc.
%prep
%setup -q -n yamllint-%{version}
# override gh#adrienverge/yamllint#401, boo#1151703 fixed by importlib.resources in python >= 3.8 and a recent setuptools
sed 's/ setuptools/ setuptools; python_version < "3.8"/' setup.cfg
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/yamllint
%check
export LANG="en_US.UTF8"
# skip test_run_with_user_global_config_file, probably same reason as upstreams GHA skip: '$HOME not overridable'
export GITHUB_RUN_ID=1
%pyunittest -v
%post
%python_install_alternative yamllint
%postun
%python_uninstall_alternative yamllint
%files %{python_files}
%doc README.rst
%license LICENSE
%python_alternative %{_bindir}/yamllint
%{python_sitelib}/yamllint
%{python_sitelib}/yamllint-%{version}*-info
%changelog