* mingw-w64-ptyhon-coverage - 4.3.4 - Update to latest version mingw-w64-python-lxml - 3.7.3 - Update to latest version, update patch mingw-w64-python-nose - 1.3.7 - make aliases (nosetests2 and nosetest3 to faciltate upgrading python to 3.6) mingw-w64-python-pbr - 2.0.0 - Update to latest version mingw-w64-python-py - 1.4.33 - Update to latest version mingw-w64-python-pyparsing - 2.2.0 Update to latest version mingw-w64-python-beautifulsoup4 - 4.5.3 - New Package mingw-w64-python-chardet - 2.3.0 - New Package mingw-w64-python-html5lib - 0.9999999 - New Package mingw-w64-python-packaging - 16.0 - New Package mingw-w64-python-pretend - 1.0.0 - New Package mingw-w64-python-webencodings - 0.5.1 - New Package * OOPS - forgot LICENSE file. * Fixes for various comments Алексей had made. Change python-packaging download to the tarbar at GitHub. Add python-appdirs (required by latest version of setuptools 34.4.0 * Fix packaging tarball dir. It was using the obsolete git reference. Note that packaging is a requirement for setuptools 34.4.0 * mingw-w64-python-chardet - try again. Removed _pyname.
93 lines
3.4 KiB
Bash
93 lines
3.4 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=html5lib
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=0.999999999
|
|
pkgrel=1
|
|
arch=('any')
|
|
pkgdesc="A Python HTML parser/tokenizer based on the WHATWG HTML5 spec (mingw-w64)"
|
|
url="https://github.com/html5lib"
|
|
license=('MIT')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3"
|
|
"unzip"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-webencodings"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-webencodings")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-six" "${MINGW_PACKAGE_PREFIX}-python2-six"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-pytest" "${MINGW_PACKAGE_PREFIX}-python3-pytest"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-lxml" "${MINGW_PACKAGE_PREFIX}-python2-lxml"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-mock" "${MINGW_PACKAGE_PREFIX}-python2-mock")
|
|
source=("${_realname}-$pkgver.tar.gz::https://github.com/html5lib/html5lib-python/archive/${pkgver}.tar.gz"
|
|
LICENSE)
|
|
sha256sums=('05c0f1ba235776060ded5093c365483d50deacdd7cabc57b6996d6e2480a4626'
|
|
'89807acf2309bd285f033404ee78581602f3cd9b819a16ac2f0e5f60ff4a473e')
|
|
|
|
prepare() {
|
|
cd "$srcdir"/
|
|
for pver in {2,3}; do
|
|
rm -rf python${pver}-build-${CARCH} | true
|
|
cp -r "${_realname}-python-${pkgver}" "python${pver}-build-${CARCH}"
|
|
done
|
|
}
|
|
|
|
# Note that build() is sometimes skipped because it's done in
|
|
# the packages setup.py install for simplicity if you can do so.
|
|
# but sometimes, you want to do a check before install which would
|
|
# also trigger the build.
|
|
build() {
|
|
for pver in {2,3}; do
|
|
msg2 "Python ${pver} build for ${CARCH}"
|
|
cd "${srcdir}/python${pver}-build-${CARCH}"
|
|
${MINGW_PREFIX}/bin/python${pver} setup.py build
|
|
done
|
|
}
|
|
|
|
check() {
|
|
#A few tests fail but most succede.
|
|
for pver in {2,3}; do
|
|
msg2 "Python ${pver} check for ${CARCH}"
|
|
cd ${srcdir}/python${pver}-build-${CARCH}/html5lib/tests
|
|
${MINGW_PREFIX}/bin/nosetests${pver} || true
|
|
done
|
|
}
|
|
|
|
package_python3-html5lib() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-six"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-webencodings")
|
|
cd "${srcdir}/python3-build-${CARCH}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
|
|
--root="${pkgdir}" --optimize=1 --skip-build
|
|
install -Dm755 $srcdir/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE
|
|
}
|
|
|
|
package_python2-html5lib() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-six"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-webencodings")
|
|
cd "${srcdir}/python2-build-${CARCH}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \
|
|
--root="${pkgdir}" --optimize=1 --skip-build
|
|
install -Dm755 $srcdir/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-html5lib() {
|
|
package_python2-html5lib
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-html5lib() {
|
|
package_python3-html5lib
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-html5lib() {
|
|
package_python2-html5lib
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-html5lib() {
|
|
package_python3-html5lib
|
|
}
|