15
0

Accepting request 491649 from devel:languages:python

1

OBS-URL: https://build.opensuse.org/request/show/491649
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-html2text?expand=0&rev=17
This commit is contained in:
2017-05-02 06:54:46 +00:00
committed by Git OBS Bridge
4 changed files with 75 additions and 19 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:44531c00fd125d0d987adf4e5ab6b4a8a2b44bfa5c4dc8896f50aa0e35c33708
size 43399

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:554ef5fd6c6cf6e3e4f725a62a3e9ec86a0e4d33cd0928136d1c79dbeb7b2d55
size 47899

View File

@@ -1,3 +1,37 @@
-------------------------------------------------------------------
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
- 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 <a> and <img> 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
* <s>, <strike>, <del> now rendered as ~~text~~.
- Implement singlespec version.
-------------------------------------------------------------------
Sun Jan 3 21:18:57 UTC 2016 - freitag@opensuse.org

View File

@@ -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,35 @@ 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}
# 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 setup.py test
%python_exec setup.py test
%endif
%files
%files %python_files
%defattr(-,root,root,-)
%doc COPYING README.md AUTHORS.rst ChangeLog.rst
%{_bindir}/html2text-python%{py_ver}
%python3_only %{_bindir}/html2text
%python3_only %{_bindir}/html2text-python
%python3_only %ghost %{_sysconfdir}/alternatives/html2text
%{python_sitelib}/*
%changelog