* 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.
91 lines
3.1 KiB
Bash
91 lines
3.1 KiB
Bash
# Contributor: Frederic Wang <fred.wang@free.fr>
|
|
|
|
_realname=coverage
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=4.3.4
|
|
pkgrel=1
|
|
pkgdesc='Code coverage measurement for Python (mingw-w64)'
|
|
url='https://coverage.readthedocs.org/'
|
|
license=('Apache 2.0')
|
|
arch=('any')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
|
_dtoken="6e/33/01cb50da2d0582c077299651038371dba988248058e03c7a7c4be0c84c40"
|
|
source=("https://pypi.python.org/packages/${_dtoken}/${_realname}-${pkgver}.tar.gz")
|
|
sha256sums=('eaaefe0f6aa33de5a65f48dd0040d7fe08cac9ac6c35a56d0a7db109c3e733df')
|
|
|
|
prepare() {
|
|
cd "$srcdir"/
|
|
for pver in {2,3}; do
|
|
rm -rf python${pver}-build-${CARCH} | true
|
|
cp -r "${_realname}-${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
|
|
msg "Python ${pver} build for ${CARCH}"
|
|
cd "${srcdir}/python${pver}-build-${CARCH}"
|
|
${MINGW_PREFIX}/bin/python${pver} setup.py build
|
|
done
|
|
}
|
|
|
|
|
|
package_python3-coverage() {
|
|
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}"
|
|
|
|
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
|
|
|
|
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
|
# fix python command in files
|
|
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do
|
|
sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f}
|
|
done
|
|
}
|
|
|
|
package_python2-coverage() {
|
|
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}"
|
|
|
|
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
|
|
|
|
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
|
# fix python command in files
|
|
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do
|
|
sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f}
|
|
done
|
|
|
|
for f in coverage; do
|
|
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe
|
|
if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then
|
|
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe.manifest
|
|
sed -e "s|${f}|${f}2|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${f}2.exe.manifest
|
|
fi
|
|
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}-script.py
|
|
done
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-coverage() {
|
|
package_python2-coverage
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-coverage() {
|
|
package_python3-coverage
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-coverage() {
|
|
package_python2-coverage
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-coverage() {
|
|
package_python3-coverage
|
|
}
|