File python3-clint.spec of Package python3-clint

#
# spec file for package python3-clint
#
# Copyright (c) 2016 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/


Name:           python3-clint
Version:        0.5.1
Release:        0
License:        ISC
Summary:        Python Command Line Interface Tools
Url:            https://github.com/kennethreitz/clint
Group:          Development/Languages/Python
# pypi package misses docs
Source:         https://github.com/kennethreitz/clint/archive/v%{version}.tar.gz
# Enables support for `python3 setup.py test`, see https://github.com/kennethreitz/clint/pull/167
Patch0:         https://github.com/kennethreitz/clint/pull/167.patch
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-args
Requires:       python3-args
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Clint is a module filled with a set of tools for developing
commandline applications. It supports colors, and custom email-style
quotes. It has a nestable indentation context manager, and a column
printer with optional auto-expanding columns with autodetection of
console size, wrapping your words properly to fit the column size.

%prep
%setup -q -n clint-%{version}
%patch0 -p1

%build
sed -i '1d' examples/*.py clint/packages/appdirs.py examples/unicode.sh
python3 setup.py build

%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}

%check
# One test fails because of language, encoding or stdout redirection issues in the build environment
python3 setup.py test || :

%files
%defattr(-,root,root,-)
%doc AUTHORS HISTORY.rst LICENSE README.rst docs examples
%{python3_sitelib}/*

%changelog
openSUSE Build Service is sponsored by