From ab2879b4b7f4876219375c87b4598df3fb7877115d44b06fd0a1e1823bd1639d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 21 Aug 2018 07:54:13 +0000 Subject: [PATCH] - Update to 2.3.1: * updated tests for upstream wycheproof changes * many other tiny test tweaks OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-humanfriendly?expand=0&rev=11 --- _multibuild | 3 +++ humanfriendly-4.16.1.tar.gz | 3 +++ humanfriendly-4.8.tar.gz | 3 --- python-humanfriendly.changes | 19 ++++++++++++++ python-humanfriendly.spec | 48 +++++++++++++++++++++++------------- 5 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 _multibuild create mode 100644 humanfriendly-4.16.1.tar.gz delete mode 100644 humanfriendly-4.8.tar.gz diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/humanfriendly-4.16.1.tar.gz b/humanfriendly-4.16.1.tar.gz new file mode 100644 index 0000000..d53b80b --- /dev/null +++ b/humanfriendly-4.16.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed1e98ae056b597f15b41bddcc32b9f21e6ab4f3445f9faad1668675de759f7b +size 343828 diff --git a/humanfriendly-4.8.tar.gz b/humanfriendly-4.8.tar.gz deleted file mode 100644 index 54084bc..0000000 --- a/humanfriendly-4.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0e74171b87318a94b99520e4f0c5651e944b5f11d696c46be3330bb82b85300 -size 319383 diff --git a/python-humanfriendly.changes b/python-humanfriendly.changes index 633beb9..e8466f8 100644 --- a/python-humanfriendly.changes +++ b/python-humanfriendly.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Fri Aug 17 13:50:03 UTC 2018 - tchvatal@suse.com + +- Update to 4.16.1: + * Added humanfriendly.text.compact_empty_lines() function. + * Enable optional html_to_ansi(data[, callback]) argument. + * Added a code sample and screenshot to the HTMLConverter documentation. + * Emit vertical whitespace for block tags like
,

and

 and post-process the generated output in __call__() to compact empty lines.
+  * Don’t pre-process preformatted text using the user defined text callback.
+  * Improve robustness against malformed HTML (previously an IndexError would be raised when a closing  tag was encountered without a corresponding opening  tag).
+  * Emit an ANSI reset code when HTMLConverter.close() is called and a style is still active (improves robustness against malformed HTML).
+  * Support for 24-bit (RGB) terminal colors. Works by accepting a tuple or list with three integers representing an RGB (red, green, blue) color.
+  * Support for italic text rendering on the terminal.
+  * Make format_timespan() accept datetime.timedelta objects (fixes #27).
+  * Add license key to setup.py script (pointed out to me in coloredlogs pull request #53).
+  * Added the Timer.sleep() method to sleep “no more than” the given number of seconds.
+  * Added the format_rst_table() function to render RST (reStructuredText) tables.
+- Enable and make sure tests are run
+
 -------------------------------------------------------------------
 Tue Aug 14 09:04:56 UTC 2018 - ms@suse.com
 
diff --git a/python-humanfriendly.spec b/python-humanfriendly.spec
index 48d769d..ff05475 100644
--- a/python-humanfriendly.spec
+++ b/python-humanfriendly.spec
@@ -16,32 +16,41 @@
 #
 
 
+%global flavor @BUILD_FLAVOR@%{nil}                                            
+%if "%{flavor}" == "test"                                                      
+%bcond_without test
+%else
+%bcond_with test                                       
+%endif       
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-# Dependency loop with colorlogs
-%bcond_with     test
+%if %{with test}
+Name:           python-humanfriendly-%{flavor}
+%else
 Name:           python-humanfriendly
-Version:        4.8
+%endif
+Version:        4.16.1
 Release:        0
 Summary:        Human friendly input/output for text interfaces using Python
 License:        MIT
 Group:          Development/Languages/Python
-Url:            https://github.com/xolox/humanfriendly
+URL:            https://github.com/xolox/python-humanfriendly
 Source:         https://files.pythonhosted.org/packages/source/h/humanfriendly/humanfriendly-%{version}.tar.gz
-BuildRequires:  %{python_module devel}
+%if %{with test}
+BuildRequires:  %{python_module capturer >= 2.1}
+BuildRequires:  %{python_module coloredlogs >= 2}
+BuildRequires:  %{python_module pytest >= 3.0.7}
+BuildRequires:  %{python_module pytest-cov >= 2.4.0}
+BuildRequires:  python2-monotonic
+%endif
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
-BuildRequires:  python-monotonic
 BuildRequires:  python-rpm-macros
-%if %{with test}
-BuildRequires:  %{python_module coloredlogs >= 2}
-%endif
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
+BuildArch:      noarch
 %ifpython2
 Requires:       python-monotonic
 %endif
-BuildArch:      noarch
-Requires(post): update-alternatives
-Requires(postun): update-alternatives
-
 %python_subpackages
 
 %description
@@ -65,32 +74,37 @@ text interfaces more user friendly.
 %python_build
 
 %install
+%if !%{with test}
 %python_install
 %python_clone -a %{buildroot}%{_bindir}/humanfriendly
 %{python_expand chmod a+x %{buildroot}%{$python_sitelib}/humanfriendly/tests.py
-sed -i "s|#!/usr/bin/env python|#!%__$python|" %{buildroot}%{$python_sitelib}/humanfriendly/tests.py
+sed -i "s|#!%{_bindir}/env python|#!%__$python|" %{buildroot}%{$python_sitelib}/humanfriendly/tests.py
 $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/humanfriendly/
 $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/humanfriendly/
 %fdupes %{buildroot}%{$python_sitelib}
 }
+%endif
 
+%if !%{with test}
 %post
 %python_install_alternative humanfriendly
 
 %postun
 %python_uninstall_alternative humanfriendly
+%endif
 
 %if %{with test}
 %check
 %python_exec setup.py test
-popd
 %endif
 
 %files %{python_files}
-%defattr(-,root,root,-)
-%doc LICENSE.txt README.rst
+%license LICENSE.txt
+%doc README.rst
+%if !%{with test}
 %python_alternative %{_bindir}/humanfriendly
 %{python_sitelib}/humanfriendly
 %{python_sitelib}/humanfriendly-%{version}-py*.egg-info
+%endif
 
 %changelog