2014-01-30 16:03:37 +01:00
|
|
|
#
|
2014-07-07 15:35:29 +02:00
|
|
|
# spec file for package python-sh
|
2014-01-30 16:03:37 +01:00
|
|
|
#
|
2024-06-10 11:09:32 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2014-01-30 16:03:37 +01: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.
|
|
|
|
|
2018-12-04 15:03:27 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-01-30 16:03:37 +01:00
|
|
|
#
|
|
|
|
|
2014-07-07 15:35:29 +02:00
|
|
|
|
2023-04-21 20:27:22 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2014-01-30 16:03:37 +01:00
|
|
|
Name: python-sh
|
2024-06-10 11:09:32 +02:00
|
|
|
Version: 2.0.7
|
2014-01-30 16:03:37 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Python subprocess interface
|
2014-07-07 15:35:29 +02:00
|
|
|
License: MIT
|
2018-12-04 18:22:30 +01:00
|
|
|
URL: https://github.com/amoffat/sh
|
2017-07-14 16:05:04 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/s/sh/sh-%{version}.tar.gz
|
2023-05-06 23:02:11 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module poetry-core}
|
2023-10-17 08:45:35 +02:00
|
|
|
BuildRequires: %{python_module pytest}
|
2023-05-06 23:02:11 +02:00
|
|
|
BuildRequires: %{python_module wheel}
|
2023-04-21 20:27:22 +02:00
|
|
|
BuildRequires: fdupes
|
2017-07-13 17:45:59 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-12-04 18:22:30 +01:00
|
|
|
BuildArch: noarch
|
2023-04-21 20:27:22 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2017-07-13 17:45:59 +02:00
|
|
|
%python_subpackages
|
2014-01-30 16:03:37 +01:00
|
|
|
|
|
|
|
%description
|
2017-06-18 23:39:01 +02:00
|
|
|
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:
|
2014-01-30 16:03:37 +01:00
|
|
|
|
|
|
|
from sh import ifconfig
|
|
|
|
print ifconfig("eth0")
|
|
|
|
|
2017-06-18 23:39:01 +02:00
|
|
|
sh is not a collection of system commands implemented in Python.
|
2014-01-30 16:03:37 +01:00
|
|
|
|
|
|
|
%prep
|
2023-05-06 23:02:11 +02:00
|
|
|
%autosetup -p1 -n sh-%{version}
|
2014-01-30 16:03:37 +01:00
|
|
|
|
|
|
|
%build
|
2023-05-06 23:02:11 +02:00
|
|
|
%pyproject_wheel
|
2014-01-30 16:03:37 +01:00
|
|
|
|
|
|
|
%install
|
2023-05-06 23:02:11 +02:00
|
|
|
%pyproject_install
|
2023-04-21 20:27:22 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2014-01-30 16:03:37 +01:00
|
|
|
|
2020-06-17 10:47:54 +02:00
|
|
|
%check
|
2023-10-17 08:45:35 +02:00
|
|
|
export SH_TESTS_RUNNING=1
|
|
|
|
export SH_TESTS_USE_SELECT=0
|
|
|
|
export LANG=C
|
|
|
|
# disable broken tests in obs environment
|
|
|
|
donttest="test_stringio_output"
|
|
|
|
donttest+=" or test_environment"
|
|
|
|
donttest+=" or test_no_interfere1"
|
|
|
|
donttest+=" or test_set_in_parent_function"
|
|
|
|
donttest+=" or test_basic"
|
|
|
|
donttest+=" or test_multiline_defaults"
|
|
|
|
%pytest -k "not ($donttest)"
|
2014-01-30 16:03:37 +01:00
|
|
|
|
2017-07-13 17:45:59 +02:00
|
|
|
%files %{python_files}
|
2018-12-04 18:22:30 +01:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc CHANGELOG.md README.rst
|
2023-05-06 23:02:11 +02:00
|
|
|
%{python_sitelib}/sh.py
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__/sh.*pyc
|
|
|
|
%{python_sitelib}/sh-%{version}*-info
|
2014-01-30 16:03:37 +01:00
|
|
|
|
|
|
|
%changelog
|