15
0

Accepting request 673392 from home:jayvdb:coala:python3-bears

- Update to v0.6.0
- Add Python 3 support
- Add %license
- Remove tests from installed package

OBS-URL: https://build.opensuse.org/request/show/673392
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bashate?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2019-02-12 08:46:11 +00:00
committed by Git OBS Bridge
commit 043245f0ad
5 changed files with 214 additions and 0 deletions

87
python-bashate.spec Normal file
View File

@@ -0,0 +1,87 @@
#
# spec file for package python-bashate
#
# 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-bashate
Version: 0.6.0
Release: 0
Summary: A pep8 equivalent for bash scripts
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 mock}
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module testrepository}
BuildRequires: %{python_module testscenarios}
BuildRequires: %{python_module testtools}
BuildRequires: python-argparse
Requires: python-Babel >= 0.9.6
BuildArch: noarch
%ifpython2
# This is not python2-argparse because Leap 42.3 has python-argparse
Requires: python-argparse
%endif
%python_subpackages
%description
A pep8 equivalent for bash scripts
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.
- Free software: Apache license
- 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
%python_build
%install
%python_install
%{python_expand #
rm -rf %{buildroot}%{$python_sitelib}/bashate/tests
sed -i -e '/^#!\//, 1d' %{buildroot}%{$python_sitelib}/bashate/bashate.py
}
%check
# The tests are failing when building both Python 2 & 3
# See test failures in test runner python-testrepository
# and https://build.opensuse.org/request/show/673188
%{python_expand #
rm -rf .testrepository
PYTHON=$python $python %{_bindir}/testr init
PYTHON=$python $python %{_bindir}/testr run
}
%files %{python_files}
%license LICENSE
%doc AUTHORS README.rst ChangeLog
%python3_only %{_bindir}/bashate
%{python_sitelib}/*
%changelog