Skip to content
Snippets Groups Projects
Commit 0e81c9e4 authored by Sandro Tosi's avatar Sandro Tosi
Browse files

Drop python2 support; Closes: #937815

parent f08dacac
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,10 @@ python-html2text (2019.8.11-2) UNRELEASED; urgency=medium
* Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
Repository-Browse.
-- Ondřej Nový <onovy@debian.org> Fri, 18 Oct 2019 15:56:40 +0200
[ Sandro Tosi ]
* Drop python2 support; Closes: #937815
-- Sandro Tosi <morph@debian.org> Thu, 23 Jan 2020 16:43:53 -0500
python-html2text (2019.8.11-1) unstable; urgency=medium
......
......@@ -6,9 +6,6 @@ Uploaders: Stefano Rivera <stefanor@debian.org>
Build-Depends:
debhelper-compat (= 12),
dh-python,
python-all,
python-pytest,
python-setuptools,
python3-all,
python3-pytest,
python3-setuptools
......@@ -18,20 +15,6 @@ Vcs-Git: https://salsa.debian.org/python-team/modules/python-html2text.git
Vcs-Browser: https://salsa.debian.org/python-team/modules/python-html2text
Rules-Requires-Root: no
Package: python-html2text
Architecture: all
Depends: python-pkg-resources, ${misc:Depends}, ${python:Depends}
Recommends: python-feedparser
Breaks: html2markdown (<< 3.200.3-3)
Replaces: html2markdown (<< 3.200.3-3)
Description: Python module for converting HTML to Markdown text
html2text is a Python module 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).
.
This package contains the Python 2 version of the library, and a script,
html2markdown.
Package: python3-html2text
Architecture: all
Depends: python3-pkg-resources, ${misc:Depends}, ${python3:Depends}
......
README.md
/usr/bin/html2markdown.py2
/usr/lib/python2.*/dist-packages
#!/bin/sh
set -e
case "$1" in
configure)
update-alternatives --install /usr/bin/html2markdown html2markdown \
/usr/bin/html2markdown.py2 20 \
--slave /usr/share/man/man1/html2markdown.1.gz \
html2markdown.1.gz \
/usr/share/man/man1/html2markdown.py2.1.gz
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
# vi: set et:
#!/bin/sh
set -e
case "$1" in
remove|deconfigure)
update-alternatives --remove html2markdown /usr/bin/html2markdown.py2
;;
upgrade|failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
# vi: set et:
/usr/bin/html2markdown.py3
/usr/lib/python3.*/dist-packages
#!/usr/bin/make -f
%:
dh $@ --buildsystem pybuild --with python2,python3
dh $@ --buildsystem pybuild --with python3
override_dh_auto_test:
dh_auto_test -- --test-pytest --test-args $(CURDIR)/test
......@@ -11,7 +11,5 @@ override_dh_auto_install:
'mv {destdir}/usr/bin/html2text {destdir}/usr/bin/html2markdown.py{version.major}'
override_dh_installman:
cp debian/html2markdown.1 debian/html2markdown.py2.1
dh_installman -p python-html2text debian/html2markdown.py2.1
cp debian/html2markdown.1 debian/html2markdown.py3.1
dh_installman -p python3-html2text debian/html2markdown.py3.1
Tests: smoketest
Depends: python-all, python-html2text
Tests: smoketest3
Depends: python3-all, python3-html2text
Tests: unittests
Depends: python-all, python-html2text, python-pytest
Tests: unittests3
Depends: python3-all, python3-html2text, python3-pytest
#!/bin/sh
set -efu
pys="$(pyversions -s 2> /dev/null)"
cd "$AUTOPKGTEST_TMP"
printf '# hi\n\n' > expected.txt
for py in $pys; do
echo "=== $py ==="
echo '<h1>hi</h1>' | $py -m html2text > output-${py}.txt
diff -u expected.txt output-${py}.txt
done
#!/bin/sh
set -efu
pys="$(pyversions -s 2> /dev/null)"
cp -a test "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"
for py in $pys; do
echo "=== $py ==="
$py -m pytest test 2>&1
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment