2019-02-12 08:46:11 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-bashate
|
|
|
|
|
#
|
2025-05-13 16:36:26 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2019-02-12 08:46:11 +00:00
|
|
|
#
|
|
|
|
|
# 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/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2025-06-04 15:23:22 +00:00
|
|
|
%bcond_without libalternatives
|
2019-02-12 08:46:11 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-02-28 22:52:47 +00:00
|
|
|
%global skip_python2 1
|
2019-02-12 08:46:11 +00:00
|
|
|
Name: python-bashate
|
2022-10-29 11:45:56 +00:00
|
|
|
Version: 2.1.1
|
2019-02-12 08:46:11 +00:00
|
|
|
Release: 0
|
2019-02-13 08:48:04 +00:00
|
|
|
Summary: A PEP8 equivalent for bash scripts
|
2019-02-12 08:46:11 +00:00
|
|
|
License: Apache-2.0
|
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
URL: https://pypi.org/project/bashate/
|
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/b/bashate/bashate-%{version}.tar.gz
|
|
|
|
|
BuildRequires: %{python_module Babel >= 0.9.6}
|
|
|
|
|
BuildRequires: %{python_module pbr}
|
2025-05-13 16:36:26 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-02-12 08:46:11 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: %{python_module testtools}
|
2025-05-13 16:36:26 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2025-06-04 15:23:22 +00:00
|
|
|
BuildRequires: alts
|
2019-02-12 08:47:58 +00:00
|
|
|
BuildRequires: fdupes
|
2022-01-11 20:55:37 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2021-01-28 13:57:09 +00:00
|
|
|
# OpenStack package: stestr is only available for primary python3, only test on this flavor
|
|
|
|
|
BuildRequires: python3-stestr
|
2025-06-04 15:23:22 +00:00
|
|
|
Requires: alts
|
2019-02-12 08:46:11 +00:00
|
|
|
Requires: python-Babel >= 0.9.6
|
2019-05-20 08:16:38 +00:00
|
|
|
Requires: python-pbr
|
2019-02-12 08:46:11 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%ifpython2
|
|
|
|
|
Requires: python-argparse
|
|
|
|
|
%endif
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
2019-02-13 08:48:04 +00:00
|
|
|
A PEP8 equivalent for bash scripts
|
2019-02-12 08:46:11 +00:00
|
|
|
|
|
|
|
|
This program attempts to be an automated style checker for bash scripts
|
|
|
|
|
to fill the same part of code review that pep8 does in most OpenStack
|
|
|
|
|
projects. It started from humble beginnings in the DevStack project,
|
|
|
|
|
and will continue to evolve over time.
|
|
|
|
|
|
|
|
|
|
- Documentation: http://docs.openstack.org/developer/bashate
|
|
|
|
|
- Source: http://git.openstack.org/cgit/openstack-dev/bash8
|
|
|
|
|
- Bugs: http://bugs.launchpad.net/bash8
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n bashate-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
2025-05-13 16:36:26 +00:00
|
|
|
%pyproject_wheel
|
2019-02-12 08:46:11 +00:00
|
|
|
|
|
|
|
|
%install
|
2025-05-13 16:36:26 +00:00
|
|
|
%pyproject_install
|
2020-05-28 07:32:14 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/bashate
|
2019-02-12 08:46:11 +00:00
|
|
|
%{python_expand #
|
|
|
|
|
rm -rf %{buildroot}%{$python_sitelib}/bashate/tests
|
|
|
|
|
sed -i -e '/^#!\//, 1d' %{buildroot}%{$python_sitelib}/bashate/bashate.py
|
|
|
|
|
}
|
2025-05-13 16:36:26 +00:00
|
|
|
%{python_compileall}
|
2019-02-12 08:47:58 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-02-12 08:46:11 +00:00
|
|
|
|
|
|
|
|
%check
|
2021-01-28 13:57:09 +00:00
|
|
|
python3 -m stestr.cli run
|
2019-02-12 08:46:11 +00:00
|
|
|
|
2025-06-04 15:23:22 +00:00
|
|
|
%pre
|
|
|
|
|
# Removing old update-alternatives entries.
|
|
|
|
|
%python_libalternatives_reset_alternative bashate
|
2020-05-28 07:32:14 +00:00
|
|
|
|
2019-02-12 08:46:11 +00:00
|
|
|
%files %{python_files}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc AUTHORS README.rst ChangeLog
|
2020-05-28 07:32:14 +00:00
|
|
|
%python_alternative %{_bindir}/bashate
|
2025-05-13 16:36:26 +00:00
|
|
|
%{python_sitelib}/bashate
|
|
|
|
|
%{python_sitelib}/bashate-%{version}*-info
|
2019-02-12 08:46:11 +00:00
|
|
|
|
|
|
|
|
%changelog
|