itstool: Port to Python 3

This commit is contained in:
Christoph Reiter
2019-10-24 10:14:30 +02:00
parent 1e7b94b7dc
commit f3cda28b06

View File

@@ -4,14 +4,14 @@ _realname=itstool
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.0.6
pkgrel=2
pkgrel=3
arch=('any')
pkgdesc="XML to PO and back again (mingw-w64)"
url="http://itstool.org/"
license=("GPL3")
depends=("${MINGW_PACKAGE_PREFIX}-python2"
depends=("${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-libxml2")
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools")
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools")
source=(http://files.itstool.org/itstool/${_realname}-${pkgver}.tar.bz2
'reloc.patch'
'pyscript2exe.py')
@@ -31,7 +31,7 @@ build() {
mkdir -p "${srcdir}/build-${CHOST}"
cd "${srcdir}/build-${CHOST}"
PYTHON="${MINGW_PREFIX}/bin/python2" \
PYTHON="${MINGW_PREFIX}/bin/python3" \
../${_realname}-${pkgver}/configure \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
@@ -53,7 +53,7 @@ package() {
make DESTDIR="${pkgdir}" install
${MINGW_PREFIX}/bin/python2 "${srcdir}/pyscript2exe.py" "${pkgdir}${MINGW_PREFIX}/bin/itstool"
${MINGW_PREFIX}/bin/python3 "${srcdir}/pyscript2exe.py" "${pkgdir}${MINGW_PREFIX}/bin/itstool"
local _PRE_WIN="$(cygpath -m ${MINGW_PREFIX})"
sed -e "s|${_PRE_WIN}|${MINGW_PREFIX}|g" \
-i ${pkgdir}${MINGW_PREFIX}/bin/itstool-script.py