File python-sh.spec of Package python-sh

#
# spec file for package python-sh
#
# 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-sh
Version:        1.12.14
Release:        0
Summary:        Python subprocess interface
License:        MIT
Group:          Development/Languages/Python
URL:            https://github.com/amoffat/sh
Source:         https://files.pythonhosted.org/packages/source/s/sh/sh-%{version}.tar.gz
Patch0:         always-use-fully-versioned-python-command-in-tests.patch
Patch1:         no-coverage.patch
Patch2:         0001-Fix-tests-for-the-drop-the-unversion-python.patch
Patch3:         pep-0538-test-fix.patch
Patch4:         fix-test_signal_group.diff
Patch5:         fix-test_general_signal.diff
BuildRequires:  %{python_module setuptools}
BuildRequires:  python-rpm-macros
BuildArch:      noarch
%python_subpackages

%description
sh is a full-fledged subprocess replacement for Python 2.6 - 3.6, PyPy
and PyPy3 that allows you to call any program as if it were a
function:

    from sh import ifconfig
    print ifconfig("eth0")

sh is not a collection of system commands implemented in Python.

%prep
%setup -q -n sh-%{version}
%autopatch -p1

%build
%python_build

%install
%python_install

%check
%python_exec test.py

%files %{python_files}
%license LICENSE.txt
%doc CHANGELOG.md README.rst
%{python_sitelib}/sh.py*
%pycache_only %{python_sitelib}/__pycache__/sh.*py*
%{python_sitelib}/sh-%{version}-*.egg-info

%changelog