14
0

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

- Fix invocation of test suite to run the tests
- Add Recommends for python2-gdbm, and BuildRequires to activate
  the tests related to gdbm
- Add disable-empty-test.patch to remove unused test module
- Update from v0.8.0 to v0.10.2

OBS-URL: https://build.opensuse.org/request/show/674778
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-proselint?expand=0&rev=9
This commit is contained in:
Tomáš Chvátal
2019-02-14 08:32:41 +00:00
committed by Git OBS Bridge
parent 91be42bcc8
commit 5d0a78e4d7
5 changed files with 73 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-proselint
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# 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
@@ -18,32 +18,37 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-proselint
Version: 0.8.0
Version: 0.10.2
Release: 0
Summary: A linter for prose
License: BSD-3-Clause
Group: Development/Languages/Python
Url: http://github.com/amperser/proselint
URL: http://github.com/amperser/proselint
Source: https://files.pythonhosted.org/packages/source/p/proselint/proselint-%{version}.tar.gz
# test_weasel_words_misc is empty in this release, and `setup.py test` doesnt recognise nose's SkipTest
Patch0: disable-empty-test.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-dbm
Requires: python-click
Requires: python-future
Requires: python-six
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module click}
BuildRequires: %{python_module future}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module six}
BuildRequires: python2-gdbm
BuildRequires: python2-mock
BuildRequires: python3-dbm
# /SECTION
Requires: python-click
Requires: python-future
Requires: python-six
%ifpython3
Requires: python3-dbm
%endif
BuildArch: noarch
%ifpython2
Recommends: python-gdbm
%endif
%python_subpackages
%description
@@ -56,6 +61,7 @@ existing tools.
%prep
%setup -q -n proselint-%{version}
%patch0 -p1
sed -i -e '/^#!\//, 1d' proselint/*.py
%build
@@ -63,12 +69,11 @@ sed -i -e '/^#!\//, 1d' proselint/*.py
%install
%python_install
%{python_expand rm -r %{buildroot}%{$python_sitelib}/tests
%fdupes %{buildroot}%{$python_sitelib}
}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_expand nosetests-%{$python_bin_suffix} proselint
# One test exec's without using sys.executable
%python_expand PATH=%{buildroot}%{_bindir}:$PATH $python setup.py test
%files %{python_files}
%doc CHANGELOG.md README.md