From 450ce63f0453e25a7cd2ad994039d938295be8d587b0c6a912ec25de79488176 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 3 May 2018 06:54:37 +0000 Subject: [PATCH] Accepting request 603521 from devel:languages:python:misc Needed by python-coloredlogs OBS-URL: https://build.opensuse.org/request/show/603521 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-capturer?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + capturer-2.4.tar.gz | 3 ++ python-capturer.changes | 4 +++ python-capturer.spec | 71 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 102 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 capturer-2.4.tar.gz create mode 100644 python-capturer.changes create mode 100644 python-capturer.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/capturer-2.4.tar.gz b/capturer-2.4.tar.gz new file mode 100644 index 0000000..e3c91da --- /dev/null +++ b/capturer-2.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:090142a58f3f85def3a7dd55d9024d0d1a86d1a88aaf9317c0f146244994a615 +size 16963 diff --git a/python-capturer.changes b/python-capturer.changes new file mode 100644 index 0000000..014dabc --- /dev/null +++ b/python-capturer.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Sep 6 17:09:07 UTC 2017 - toddrme2178@gmail.com + +- Initial version diff --git a/python-capturer.spec b/python-capturer.spec new file mode 100644 index 0000000..0f65b0b --- /dev/null +++ b/python-capturer.spec @@ -0,0 +1,71 @@ +# +# spec file for package python-capturer +# +# Copyright (c) 2017 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 http://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_with test +Name: python-capturer +Version: 2.4 +Release: 0 +Summary: Easily capture stdout/stderr of the current process and subprocesses +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 devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module humanfriendly >= 2.1} +%endif +Requires: python-humanfriendly >= 2.1 +BuildArch: noarch + +%python_subpackages + +%description +The capturer package makes it easy to capture 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 +%python_exec setup.py test +%endif + +%files %{python_files} +%defattr(-,root,root,-) +%doc LICENSE.txt README.rst +%{python_sitelib}/* + +%changelog