15
0
Files
python-capturer/python-capturer.spec
Tomáš Chvátal a785ba3ee3 Accepting request 789712 from home:mcalabkova:branches:devel:languages:python
- Update to 3.0
  * Added support for Python 3.7 and 3.8.
  * Dropped support for Python 2.6 and 3.4.
  * Actively deprecate ``interpret_carriage_returns()``.
  * Moved test helpers to :mod:`humanfriendly.testing`.
  * Include documentation in source distributions.
  * Use Python 3 for local development (``Makefile``).
  * Restructured the online documentation.
  * Updated PyPI domain in documentation.
  * Added this changelog.

OBS-URL: https://build.opensuse.org/request/show/789712
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-capturer?expand=0&rev=8
2020-03-30 12:52:49 +00:00

75 lines
2.3 KiB
RPMSpec

#
# spec file for package python-capturer
#
# Copyright (c) 2020 SUSE LLC
#
# 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-capturer
Version: 3.0
Release: 0
Summary: Python module for capturing stdout/stderr of the current process group
License: MIT
Group: Development/Languages/Python
URL: https://capturer.readthedocs.io
Source: https://files.pythonhosted.org/packages/source/c/capturer/capturer-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module coverage >= 4.2}
BuildRequires: %{python_module humanfriendly >= 8.0}
BuildRequires: %{python_module pytest >= 3.0.4}
BuildRequires: %{python_module pytest-cov >= 2.4.0}
%endif
Requires: python-humanfriendly >= 8.0
BuildArch: noarch
%python_subpackages
%description
The capturer package captures the stdout and stderr streams
of the current process *and subprocesses*. Output can be relayed to the
terminal in real time, but is also available to the Python program for
additional processing. It's currently tested on cPython 2.6, 2.7, 3.4, 3.5, 3.6
and PyPy (2.7). It's tested on Linux and Mac OS X and may work on other unixes
but definitely won't work on Windows (due to the use of the platform dependent
"pty" module).
%prep
%setup -q -n capturer-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
export LANG=en_US.UTF-8
%pytest capturer/tests.py
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst
%license LICENSE.txt
%{python_sitelib}/*
%changelog