2016-10-10 20:41:23 +00:00
|
|
|
|
#
|
|
|
|
|
|
# spec file for package python-humanfriendly
|
|
|
|
|
|
#
|
2016-07-15 18:12:44 +00:00
|
|
|
|
# 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.
|
|
|
|
|
|
|
2016-10-10 20:41:23 +00:00
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
|
#
|
|
|
|
|
|
|
2016-07-15 18:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
Name: python-humanfriendly
|
2016-10-10 20:41:23 +00:00
|
|
|
|
Version: 2.1
|
2016-07-15 18:12:44 +00:00
|
|
|
|
Release: 0
|
|
|
|
|
|
Summary: Human friendly input/output for text interfaces using Python
|
|
|
|
|
|
License: MIT
|
|
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
|
Url: https://github.com/xolox/%{name}
|
2016-10-10 20:41:23 +00:00
|
|
|
|
Source: https://pypi.io/packages/source/h/humanfriendly/humanfriendly-%{version}.tar.gz
|
2016-07-15 18:12:44 +00:00
|
|
|
|
BuildRequires: python-setuptools
|
2016-10-10 20:41:23 +00:00
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2016-07-15 18:12:44 +00:00
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
2016-10-10 20:41:23 +00:00
|
|
|
|
The functions and classes in the humanfriendly package can be used to make
|
|
|
|
|
|
text interfaces more user friendly.
|
|
|
|
|
|
|
|
|
|
|
|
Some example features:
|
|
|
|
|
|
* Parsing and formatting numbers, file sizes, pathnames and timespans in
|
|
|
|
|
|
simple, human friendly formats.
|
|
|
|
|
|
* Easy to use timers for long running operations, with human friendly
|
|
|
|
|
|
formatting of the resulting timespans.
|
|
|
|
|
|
* Prompting the user to select a choice from a list of options by typing
|
|
|
|
|
|
the option’s number or a unique substring of the option.
|
|
|
|
|
|
* Terminal interaction including text styling (ANSI escape sequences), user
|
|
|
|
|
|
friendly rendering of usage messages and querying the terminal for its size.
|
2016-07-15 18:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
%prep
|
2016-10-10 20:41:23 +00:00
|
|
|
|
%setup -q -n humanfriendly-%{version}
|
2016-07-15 18:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
# TODO properly build docs
|
|
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
|
%doc LICENSE.txt README.rst
|
|
|
|
|
|
%{_bindir}/humanfriendly
|
2016-10-10 20:41:23 +00:00
|
|
|
|
%{python_sitelib}/humanfriendly
|
|
|
|
|
|
%{python_sitelib}/humanfriendly-%{version}-py%{py_ver}.egg-info
|
2016-07-15 18:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
%changelog
|