SHA256
1
0
forked from pool/python-sh
python-sh/python-sh.spec

69 lines
1.9 KiB
RPMSpec

#
# spec file for package python-sh
#
# Copyright (c) 2018 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-%{**}}
%bcond_without test
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
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module coverage}
%endif
%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}
%build
%python_build
%install
%python_install
%if %{with test}
%check
%python_exec test.py
%endif
%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