74 lines
2.3 KiB
Bash
74 lines
2.3 KiB
Bash
# Maintainer: Ryuta Suzuki <oroppas@gmail.com>
|
|
|
|
_realname=simplegeneric
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-simplegeneric" "${MINGW_PACKAGE_PREFIX}-python2-simplegeneric")
|
|
pkgver=0.8.1
|
|
pkgrel=4
|
|
pkgdesc="File system based database that uses python pickles (mingw-w64)"
|
|
url="https://github.com/jaraco/simplegeneric.py"
|
|
arch=('any')
|
|
license=('Zope Public License')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
|
source=("https://pypi.python.org/packages/source/s/${_realname}/${_realname}-${pkgver}.zip")
|
|
sha256sums=('dc972e06094b9af5b855b3df4a646395e43d1c9d0d39ed345b7393560d0b9173')
|
|
|
|
prepare() {
|
|
cd "${srcdir}"
|
|
for builddir in python{2,3}-build-${CARCH}; do
|
|
rm -rf ${builddir} | true
|
|
cp -r "${_realname}-${pkgver}" "${builddir}"
|
|
done
|
|
# Set version for setuptools_scm
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
check() {
|
|
for pver in {2,3}; do
|
|
msg "Python ${pver} test for ${CARCH}"
|
|
cd "${srcdir}/python${pver}-build-${CARCH}"
|
|
${MINGW_PREFIX}/bin/python${pver} setup.py test
|
|
done
|
|
}
|
|
|
|
package_python3-simplegeneric() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3")
|
|
|
|
cd "${srcdir}/python3-build-${CARCH}"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python3 setup.py install --root=${pkgdir} --prefix=${MINGW_PREFIX} --optimize=1 --skip-build
|
|
}
|
|
|
|
package_python2-simplegeneric() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2")
|
|
|
|
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
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-simplegeneric() {
|
|
package_python2-simplegeneric
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-simplegeneric() {
|
|
package_python3-simplegeneric
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-simplegeneric() {
|
|
package_python2-simplegeneric
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-simplegeneric() {
|
|
package_python3-simplegeneric
|
|
}
|