Upgrade to the latest upstream (RHBZ #1229552)
This commit is contained in:
parent
932a038848
commit
33cb2abb5a
4 changed files with 63 additions and 34 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
html2text-2.38.py
|
html2text-2.38.py
|
||||||
/python-html2text-3.02.tar.gz
|
/python-html2text-3.02.tar.gz
|
||||||
/aaronsw-html2text-3.02-77-gc368b14.tar.gz
|
/aaronsw-html2text-3.02-77-gc368b14.tar.gz
|
||||||
|
/html2text-2015.6.6.tar.gz
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
diff -Nur aaronsw-html2text-c368b14-orig/html2text.py aaronsw-html2text-c368b14/html2text.py
|
|
||||||
--- aaronsw-html2text-c368b14-orig/html2text.py 2012-01-07 16:01:09.000000000 +0100
|
|
||||||
+++ aaronsw-html2text-c368b14/html2text.py 2013-02-19 11:53:09.609134393 +0100
|
|
||||||
@@ -479,6 +479,7 @@
|
|
||||||
if has_key(attrs, 'src'):
|
|
||||||
attrs['href'] = attrs['src']
|
|
||||||
alt = attrs.get('alt', '')
|
|
||||||
+ alt = re.sub('\n', ' ', alt)
|
|
||||||
if self.inline_links:
|
|
||||||
self.o("![")
|
|
||||||
self.o(alt)
|
|
||||||
|
|
@ -1,27 +1,35 @@
|
||||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 16
|
||||||
|
%bcond_without python3
|
||||||
|
%else
|
||||||
|
%bcond_with python3
|
||||||
|
%endif
|
||||||
|
|
||||||
%global tardirname aaronsw-html2text-c368b14
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||||
|
%{!?__python2: %global __python2 /usr/bin/python2}
|
||||||
|
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||||
|
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: python-html2text
|
%global upname html2text
|
||||||
Version: 3.200.3
|
|
||||||
Release: 7%{?dist}
|
Name: python-%{upname}
|
||||||
|
Version: 2015.6.6
|
||||||
|
Release: 1%{?dist}
|
||||||
Summary: Converts a page of HTML into plain ASCII text
|
Summary: Converts a page of HTML into plain ASCII text
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
URL: http://www.aaronsw.com/2002/html2text/
|
URL: http://alir3z4.github.io/html2text/
|
||||||
#Source0: https://github.com/aaronsw/html2text/tarball/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://pypi.python.org/packages/source/h/%{upname}/%{upname}-%{version}.tar.gz
|
||||||
# git clone git://github.com/aaronsw/html2text.git aaronsw-html2text-c368b14 ; cd aaronsw-html2text-c368b14 ; git checkout c368b14
|
|
||||||
Source0: aaronsw-html2text-3.02-77-gc368b14.tar.gz
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
%if %{with python3}
|
||||||
# Debian bug #299027
|
BuildRequires: python3-devel
|
||||||
Patch0: aaronsw-html2text-remove-newlines.patch
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
@ -31,32 +39,63 @@ be valid Markdown (a text-to-HTML format).
|
||||||
|
|
||||||
Also known as: THE ASCIINATOR, html to text, htm to txt, htm2txt, ...
|
Also known as: THE ASCIINATOR, html to text, htm to txt, htm2txt, ...
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%package -n python3-%{upname}
|
||||||
|
Summary: Easily build and distribute Python 3 packages
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
%description -n python3-%{upname}
|
||||||
|
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).
|
||||||
|
|
||||||
|
Also known as: THE ASCIINATOR, html to text, htm to txt, htm2txt, ...
|
||||||
|
|
||||||
|
This package contains python3 version of the package.
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{tardirname}
|
%setup -q -n %{upname}-%{version}
|
||||||
%patch0 -p1 -b .remove-newlines
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install --root $RPM_BUILD_ROOT
|
%if %{with python3}
|
||||||
# new script in 3.200.3 : conflicts with package' html2text' obviously
|
%{__python3} setup.py install --root %{buildroot}
|
||||||
mv $RPM_BUILD_ROOT/usr/bin/html2text $RPM_BUILD_ROOT/usr/bin/%{name}
|
# we don't need second binary
|
||||||
|
rm -fv $RPM_BUILD_ROOT%{_bindir}/html2text
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%{__python2} setup.py install --root %{buildroot}
|
||||||
|
# new script in 3.200.3 : conflicts with package' html2text' obviously
|
||||||
|
mv $RPM_BUILD_ROOT%{_bindir}/html2text $RPM_BUILD_ROOT%{_bindir}/%{name}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cd test
|
%{__python} setup.py test
|
||||||
PYTHONPATH=${RPM_BUILD_ROOT}%{python_sitelib} %{__python} run_tests.py
|
%if %{with python3}
|
||||||
|
%{__python3} setup.py test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
/usr/bin/%{name}
|
%{_bindir}/%{name}
|
||||||
%{python_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%files -n python3-%{upname}
|
||||||
|
%{python3_sitelib}/*
|
||||||
|
%doc COPYING
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 09 2015 Matej Cepl <mcepl@redhat.com> - 2015.6.6-1
|
||||||
|
- Upgrade to the latest upstream (RHBZ #1229552)
|
||||||
|
|
||||||
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 3.200.3-7
|
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 3.200.3-7
|
||||||
- Replace python-setuptools-devel BR with python-setuptools
|
- Replace python-setuptools-devel BR with python-setuptools
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
5aab989207988e8ec1ebbf43ed1d84a4 aaronsw-html2text-3.02-77-gc368b14.tar.gz
|
c03ae2481d7abddb01c14bbee4c1e85f html2text-2015.6.6.tar.gz
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue