From d52fcd3006f0675dfa79187abbf2ae697128050391f1ad17d4821671c8cd192c Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 19 Apr 2017 14:07:51 +0000 Subject: [PATCH 1/2] Accepting request 489324 from home:TheBlackCat:branches:devel:languages:python - update to version 2016.9.19. - Implement single-spec version. OBS-URL: https://build.opensuse.org/request/show/489324 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-html2text?expand=0&rev=21 --- html2text-2015.11.4.tar.gz | 3 --- html2text-2016.9.19.tar.gz | 3 +++ python-html2text.changes | 28 +++++++++++++++++++++++ python-html2text.spec | 47 +++++++++++++++++++++++++------------- 4 files changed, 62 insertions(+), 19 deletions(-) delete mode 100644 html2text-2015.11.4.tar.gz create mode 100644 html2text-2016.9.19.tar.gz diff --git a/html2text-2015.11.4.tar.gz b/html2text-2015.11.4.tar.gz deleted file mode 100644 index dcc36c7..0000000 --- a/html2text-2015.11.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:44531c00fd125d0d987adf4e5ab6b4a8a2b44bfa5c4dc8896f50aa0e35c33708 -size 43399 diff --git a/html2text-2016.9.19.tar.gz b/html2text-2016.9.19.tar.gz new file mode 100644 index 0000000..42f66c7 --- /dev/null +++ b/html2text-2016.9.19.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:554ef5fd6c6cf6e3e4f725a62a3e9ec86a0e4d33cd0928136d1c79dbeb7b2d55 +size 47899 diff --git a/python-html2text.changes b/python-html2text.changes index f802df6..01de2bb 100644 --- a/python-html2text.changes +++ b/python-html2text.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Wed Apr 12 19:18:13 UTC 2017 - toddrme2178@gmail.com + +- update to version 2016.9.19: + * Default image alt text option created and set to a default of + empty string "" to maintain backward compatibility + * Fix #136: --default-image-alt now takes a string as argument + * Fix #113: Stop changing quiet levels on /script tags. + * Merge #126: Fix deprecation warning on py3 due to html.escape + * Fix #145: Running test suite on Travis CI for Python 2.6. +- update to version 2016.5.29: + * Fix #125: --pad_tables now pads table cells to make them look + nice. + * Fix #114: Break does not interrupt blockquotes + * Deprecation warnings for URL retrieval. +- update to version 2016.4.2: + * Fix #106: encoding by stdin + * Fix #89: Python 3.5 support. + * Fix #113: inplace baseurl substitution for and tags. + * Feature #118: Update the badges to badge.kloud51.com + * Fix #119: new-line after a list is inserted +- update to version 2016.1.8: + * Feature #99: Removed duplicated initialisation. + * Fix #100: Get element style key error. + * Fix #101: Fix error end tag pop exception + * , , now rendered as ~~text~~. +- Implement singlespec version. + ------------------------------------------------------------------- Sun Jan 3 21:18:57 UTC 2016 - freitag@opensuse.org diff --git a/python-html2text.spec b/python-html2text.spec index 8d20f49..00354ff 100644 --- a/python-html2text.spec +++ b/python-html2text.spec @@ -1,7 +1,7 @@ # # spec file for package python-html2text # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -16,23 +16,29 @@ # +%bcond_without tests + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-html2text -Version: 2015.11.4 +Version: 2016.9.19 Release: 0 Url: https://github.com/Alir3z4/html2text/ Summary: Turn HTML into equivalent Markdown-structured text License: GPL-3.0 Group: Development/Languages/Python -Source: https://pypi.python.org/packages/source/h/html2text/html2text-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/h/html2text/html2text-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: python-unittest2 -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else -BuildArch: noarch +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +%if %{with tests} +BuildRequires: python2-unittest2 %endif +Requires(post): update-alternatives +Requires(preun): update-alternatives +BuildArch: noarch +%python_subpackages %description html2text is a Python script that converts a page of HTML into clean, @@ -45,19 +51,28 @@ be valid Markdown (a text-to-HTML format). sed -i '/^#!/d' html2text/__init__.py %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} -mv %{buildroot}%{_bindir}/html2text %{buildroot}%{_bindir}/html2text-python%{py_ver} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_clone -a %{buildroot}%{_bindir}/html2text +%if %{with tests} %check -python setup.py test +%python_exec setup.py test +%endif -%files +%post +%python_install_alternative html2text + +%preun +%python_uninstall_alternative html2text + +%files %python_files %defattr(-,root,root,-) %doc COPYING README.md AUTHORS.rst ChangeLog.rst -%{_bindir}/html2text-python%{py_ver} +%python_alternative %{_bindir}/html2text %{python_sitelib}/* %changelog From 1910c611c564ed0618b20105b341790f4f9db1730b67e221556b1d7ddf2e2dc3 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 27 Apr 2017 16:34:12 +0000 Subject: [PATCH 2/2] Accepting request 491648 from home:TheBlackCat:branches:devel:languages:python - Implement update-alternatives to avoid conflict with html2text package. OBS-URL: https://build.opensuse.org/request/show/491648 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-html2text?expand=0&rev=22 --- python-html2text.changes | 6 ++++++ python-html2text.spec | 23 +++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/python-html2text.changes b/python-html2text.changes index 01de2bb..917b3ab 100644 --- a/python-html2text.changes +++ b/python-html2text.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 27 16:33:29 UTC 2017 - toddrme2178@gmail.com + +- Implement update-alternatives to avoid conflict with html2text + package. + ------------------------------------------------------------------- Wed Apr 12 19:18:13 UTC 2017 - toddrme2178@gmail.com diff --git a/python-html2text.spec b/python-html2text.spec index 00354ff..748456e 100644 --- a/python-html2text.spec +++ b/python-html2text.spec @@ -56,23 +56,30 @@ sed -i '/^#!/d' html2text/__init__.py %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%python_clone -a %{buildroot}%{_bindir}/html2text + +# To avoid conflicts with the rst2html5 package +mv %{buildroot}%{_bindir}/html2text %{buildroot}%{_bindir}/html2text-python +ln -s -f %{_sysconfdir}/alternatives/html2text %{buildroot}%{_bindir}/html2text + +%post +update-alternatives --install %{_bindir}/html2text html2text %{_bindir}/html2text-python 15 + +%preun +if [ ! -f %{_bindir}/html2text-python ] ; then + update-alternatives --remove html2text %{_bindir}/html2text-python +fi %if %{with tests} %check %python_exec setup.py test %endif -%post -%python_install_alternative html2text - -%preun -%python_uninstall_alternative html2text - %files %python_files %defattr(-,root,root,-) %doc COPYING README.md AUTHORS.rst ChangeLog.rst -%python_alternative %{_bindir}/html2text +%python3_only %{_bindir}/html2text +%python3_only %{_bindir}/html2text-python +%python3_only %ghost %{_sysconfdir}/alternatives/html2text %{python_sitelib}/* %changelog