2010-12-21 16:05:53 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-html2text
|
|
|
|
|
#
|
2016-03-09 16:31:23 +00:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2010-12-21 16:05:53 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
2013-10-24 11:06:39 +00:00
|
|
|
|
2010-12-21 16:05:53 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
2013-10-24 11:06:39 +00:00
|
|
|
|
2011-09-21 09:30:47 +00:00
|
|
|
Name: python-html2text
|
2016-03-09 16:31:23 +00:00
|
|
|
Version: 2015.11.4
|
2011-09-21 09:30:47 +00:00
|
|
|
Release: 0
|
2015-04-20 12:59:54 +00:00
|
|
|
Url: https://github.com/Alir3z4/html2text/
|
2011-09-21 09:30:47 +00:00
|
|
|
Summary: Turn HTML into equivalent Markdown-structured text
|
2011-11-24 11:51:19 +00:00
|
|
|
License: GPL-3.0
|
2010-12-21 16:05:53 +00:00
|
|
|
Group: Development/Languages/Python
|
2013-10-28 13:19:52 +00:00
|
|
|
Source: https://pypi.python.org/packages/source/h/html2text/html2text-%{version}.tar.gz
|
2010-12-21 16:05:53 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-09-21 09:30:47 +00:00
|
|
|
BuildRequires: python-devel
|
2013-10-24 11:06:39 +00:00
|
|
|
BuildRequires: python-setuptools
|
2015-04-20 12:59:54 +00:00
|
|
|
BuildRequires: python-unittest2
|
2013-10-28 13:19:52 +00:00
|
|
|
%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
|
2010-12-21 16:05:53 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
2015-04-20 12:59:54 +00:00
|
|
|
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).
|
2010-12-21 16:05:53 +00:00
|
|
|
|
|
|
|
|
%prep
|
2011-11-09 19:00:18 +00:00
|
|
|
%setup -q -n html2text-%{version}
|
2015-04-20 12:59:54 +00:00
|
|
|
# remove useless shebang
|
|
|
|
|
sed -i '/^#!/d' html2text/__init__.py
|
2010-12-21 16:05:53 +00:00
|
|
|
|
|
|
|
|
%build
|
2011-11-24 11:51:19 +00:00
|
|
|
python setup.py build
|
2010-12-21 16:05:53 +00:00
|
|
|
|
|
|
|
|
%install
|
2011-09-21 09:30:47 +00:00
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2015-04-20 12:59:54 +00:00
|
|
|
mv %{buildroot}%{_bindir}/html2text %{buildroot}%{_bindir}/html2text-python%{py_ver}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
python setup.py test
|
2010-12-21 16:05:53 +00:00
|
|
|
|
2011-09-21 09:30:47 +00:00
|
|
|
%files
|
2010-12-21 16:05:53 +00:00
|
|
|
%defattr(-,root,root,-)
|
2015-04-20 12:59:54 +00:00
|
|
|
%doc COPYING README.md AUTHORS.rst ChangeLog.rst
|
|
|
|
|
%{_bindir}/html2text-python%{py_ver}
|
2011-11-09 19:00:18 +00:00
|
|
|
%{python_sitelib}/*
|
2010-12-21 16:05:53 +00:00
|
|
|
|
|
|
|
|
%changelog
|