* python2-configparser 3.5.0 1) Use bitbucket.org source-code so we can run tests 2) Run tests 3) add python2-backports as a dependency. This package does seem to use that namespace. * increase pkgrel. * add --skip-build to setup.py install. Don't use pkname for installing the license. Use python2 instead.
53 lines
1.8 KiB
Bash
53 lines
1.8 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=configparser
|
|
pkgbase=mingw-w64-python2-${_realname}
|
|
pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}"
|
|
pkgver=3.5.0
|
|
pkgrel=3
|
|
_prefix="ambv-"
|
|
_vertag='aeef7ca1c988'
|
|
pkgdesc="This library brings the updated configparser from Python 3.5 to Python 2.6-3.5. (mingw-w64)"
|
|
arch=('any')
|
|
url="https://bitbucket.org/ambv/configparser"
|
|
license=('MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python2-backports")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
|
source=("${_realname}-$pkgver"::"https://bitbucket.org/ambv/configparser/get/$pkgver.tar.gz"
|
|
license)
|
|
sha256sums=('283488e119c6f3f8f3dd3dea52bf3e593b4cf165a21a16ea0c79fdcec7d42aad'
|
|
'8c692bafaeb99a822a74d7180c578b14ea3b958095c3d75536ba4932420dad16')
|
|
|
|
prepare() {
|
|
sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
|
|
$(find "${srcdir}"/ambv-configparser-${_vertag} -name '*.py')
|
|
rm -rf python2-build-${CARCH} | true
|
|
cp -r "${_prefix}${_realname}-${_vertag}" "python2-build-${CARCH}"
|
|
}
|
|
|
|
build() {
|
|
msg "Python 2 build for ${CARCH}"
|
|
cd "${srcdir}"/python2-build-${CARCH}
|
|
|
|
${MINGW_PREFIX}/bin/python2 setup.py build
|
|
}
|
|
|
|
check() {
|
|
msg "Python 2 test for ${CARCH}"
|
|
cd "${srcdir}"/python2-build-${CARCH}/src
|
|
for _f in test_configparser.py test_helpers.py; do
|
|
msg "Python 2 ${_f} test for ${CARCH}"
|
|
${MINGW_PREFIX}/bin/python2 ${_f}
|
|
done
|
|
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}"/python2-build-${CARCH}
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python2 setup.py install --root="$pkgdir" --prefix=${MINGW_PREFIX} --optimize=1 --skip-build
|
|
|
|
install -D "${srcdir}"/license "$pkgdir${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
|
|
}
|