Files
2020-02-01 20:05:51 -05:00

72 lines
2.4 KiB
Tcl

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup python 1.0
PortGroup select 1.0
name py-html2text
version 2020.1.16
revision 0
categories-append textproc
platforms darwin
license GPL-3+
supported_archs noarch
maintainers {khindenburg @kurthindenburg} openmaintainer
description Script to turn HTML into equivalent Markdown-structured text.
long_description \
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).
homepage https://pypi.python.org/pypi/${python.rootname}
master_sites pypi:[string index ${python.rootname} 0]/${python.rootname}/
distname ${python.rootname}-${version}
checksums rmd160 a36b162620bbd0337e69fd67cdf0f54211074ad3 \
sha256 e296318e16b059ddb97f7a8a1d6a5c1d7af4544049a01e261731d2d5cc277bbb \
size 49464
python.versions 27 35 36 37 38
if {${name} ne ${subport}} {
if {${python.version} eq 27} {
version 2019.8.11
epoch 1
revision 0
distname ${python.rootname}-${version}
checksums rmd160 d7794cb2ca31d02d9359aae569a053be688a1e55 \
sha256 f516b9c10284174e2a974d86f91cab02b3cf983a17752075da751af0e895ef5e \
size 48721
}
depends_lib-append port:py${python.version}-setuptools
depends_run-append port:py-html2text_select
# Fix permissions
post-extract {
system "find ${worksrcpath} -type d -print0 | xargs -0 chmod a+rx"
system "find ${worksrcpath} -type f -print0 | xargs -0 chmod a+r"
}
select.group py-html2text
select.file ${filespath}/py${python.version}-html2text
depends_test-append port:py${python.version}-pytest
test.run yes
test.env PYTHONPATH=${worksrcpath}/build/lib
test.cmd py.test-${python.branch}
livecheck.type none
notes "
To make the Python ${python.branch} version of py-html2text the one that is run\
when you execute the commands without a version suffix, e.g. 'html2text', run:
port select --set ${select.group} [file tail ${select.file}]
"
}