15
0

Accepting request 298180 from devel:languages:python

1

OBS-URL: https://build.opensuse.org/request/show/298180
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-html2text?expand=0&rev=15
This commit is contained in:
2015-04-21 08:53:44 +00:00
committed by Git OBS Bridge
5 changed files with 88 additions and 46 deletions

View File

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

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:040a4ace61446ab1e323e71e95e8ce16a5f0cc889027f17974ef8be1391721df
size 21446

View File

@@ -1,32 +0,0 @@
From ed9b7477d24caf5e5afe2a55c399eed2b9863dbd Mon Sep 17 00:00:00 2001
From: Sascha Peilicke <saschpe@gmx.de>
Date: Mon, 28 Oct 2013 14:14:51 +0100
Subject: [PATCH] Add ".py" suffix to html2text entrypoint
Many distributions (including Gentoo and openSUSE) already ship
/usr/bin/html2text as part of the "html2text" package. Therefore the
current entry point collides with this system binary. Adding a .py
prefix would mean it's installed as /usr/bin/html2text.py which is just
working fine.
Fixes #42
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index dd3d9bc..eddeb92 100644
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@
],
entry_points="""
[console_scripts]
- html2text=html2text:main
+ html2text.py=html2text:main
""",
license='GNU GPL 3',
packages=find_packages(),
--
1.8.4

View File

@@ -1,3 +1,73 @@
-------------------------------------------------------------------
Sun Apr 19 11:25:59 UTC 2015 - benoit.monin@gmx.fr
- update to version 2015.4.14:
* Feature #59: Write image tags with height and width attrs as
raw html to retain dimensions
- additional changes from version 2015.4.13:
* Feature #56: Treat '-' file parameter as stdin.
* Feature #57: Retain escaping of html except within code or pre
tags.
- additional changes from version 2015.2.18:
* Fix #38: Anchor tags with empty text or with `<img>` tags
inside are no longer stripped.
- additional changes from version 2014.12.29:
* Feature #51: Add single line break option.
- additional changes from version 2014.12.24:
* Feature #49: Added a images_to_alt option to discard images and
keep only their alt.
* Feature #50: Protect links, surrounding them with angle
brackets to avoid breaking...
* Feature: Add ``setup.cfg`` file.
- additional changes from version 2014.12.5:
* Feature: Update `README.md` with usage examples.
* Fix #35: Remove `py_modules` from `setup.py`.
* Fix #36: Excludes tests from being installed as a separate
module.
* Fix #37: Don't hardcode the path to the installed binary.
* Fix: Readme typo in running cli.
* Feature #40: Extract cli part to ``cli`` module.
* Feature #42: Bring python version compatibility to
``compat.py`` module.
* Feature #41: Extract utility/helper methods to ``utils`` module
* Fix #45: Does not accept standard input when running under
Python 3.
* Feature: Clean up ``ChangeLog.rst`` for version and date
numbers.
- additional changes from version 2014.9.25:
* Feature #29, #27: Add simple table support with bypass option.
* Fix #20: Replace project website with:
http://alir3z4.github.io/html2text/
- additional changes from version 2014.9.8:
* Fix #28: missing ``html2text`` package in installation.
- additional changes from version 2014.9.7:
* Fix ``unicode``/``type`` error in memory leak unit-test.
* Feature #16: Remove ``install_deps.py``.
* Feature #17: Add status badges via pypin.
* Feature #18: Add ``Python`` ``3.4`` to travis config file.
* Feature #19: Bring ``html2text`` to a separate module and take
out the ``conf``/``constant`` variables.
* Feature #21: Remove meta vars from ``html2text.py`` file header
* Fix: Fix TypeError when parsing tags like <img src='foo' alt>.
Fixed in #25.
- additional changes from version 2014.7.3:
* Fix #8: Remove ``How to do a release`` section from README.md.
* Fix #11: Include test directory markdown, html files.
* Fix #13: memory leak in using ``handle`` while keeping the old
instance of ``html2text``.
- additional changes from version 2014.4.5:
* Fix #1: Add ``ChangeLog.rst`` file.
* Fix #2: Add ``AUTHORS.rst`` file.
- update URL to maintainer homepage
- drop html2text-entrypoints.patch: rename the script instead
- update package description
- add unittest2 to buildrequire for the tests
- add %check to run the tests during build
- install the script as html2text-python%{py_ver}
- add AUTHORS.rst and ChangeLog.rst to documentation
- remove useless shebang in __init__.py
-------------------------------------------------------------------
Sun Feb 8 06:16:02 UTC 2015 - arun@gmx.de
- specfile:

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-html2text
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 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
@@ -17,18 +17,17 @@
Name: python-html2text
Version: 3.200.3
Version: 2015.4.14
Release: 0
Url: http://www.aaronsw.com/2002/html2text/
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
# PATCH-FIX-UPSTREAM speilicke@suse.com -- https://github.com/aaronsw/html2text/pull/79
Patch0: html2text-entrypoints.patch
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
@@ -36,24 +35,29 @@ BuildArch: noarch
%endif
%description
Turn HTML into equivalent Markdown-structured text.
html2text is a Python script that converts a page of HTML into clean,
easy-to-read plain ASCII text. Better yet, that ASCII also happens to
be valid Markdown (a text-to-HTML format).
%prep
%setup -q -n html2text-%{version}
%patch0 -p1
# remove useless shebang
sed -i '/^#!/d' html2text/__init__.py
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# An upstream mistake. A conflict betwenn html2text.py in python_sitelib
# and in bindir when an external project tries to import it
rm %{buildroot}%{_bindir}/html2text.py
mv %{buildroot}%{_bindir}/html2text %{buildroot}%{_bindir}/html2text-python%{py_ver}
%check
python setup.py test
%files
%defattr(-,root,root,-)
%doc COPYING README.md
%doc COPYING README.md AUTHORS.rst ChangeLog.rst
%{_bindir}/html2text-python%{py_ver}
%{python_sitelib}/*
%changelog