40 lines
1.3 KiB
Bash
40 lines
1.3 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=configparser
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}"
|
|
pkgver=3.5.0
|
|
pkgrel=2
|
|
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")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
|
source=("https://pypi.io/packages/source/c/configparser/configparser-${pkgver}.tar.gz"
|
|
license)
|
|
md5sums=('cfdd915a5b7a6c09917a64a573140538'
|
|
'f8e5b03556ed846d7681bacd4126f484')
|
|
|
|
prepare() {
|
|
sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
|
|
$(find "${srcdir}"/configparser-${pkgver} -name '*.py')
|
|
rm -rf python2-build-${CARCH} | true
|
|
cp -r "configparser-${pkgver}" "python2-build-${CARCH}"
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/python2-build-${CARCH}"
|
|
|
|
${MINGW_PREFIX}/bin/python2 setup.py build
|
|
}
|
|
|
|
package() {
|
|
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
|
|
|
|
install -D "${srcdir}"/license "$pkgdir${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
|
|
}
|