93 lines
3.2 KiB
Bash
93 lines
3.2 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=pyrsistent
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=0.14.9
|
|
pkgrel=1
|
|
pkgdesc="Persistent/Functional/Immutable data structures (mingw-w64)"
|
|
arch=('any')
|
|
url='https://github.com/tobgu/pyrsistent'
|
|
license=('MIT')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
|
|
"${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest-runner"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-pytest-runner"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-flake8"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-flake8"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-hypothesis"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-hypothesis")
|
|
options=('staticlibs' 'strip' '!debug')
|
|
source=("https://pypi.io/packages/source/p/pyrsistent/pyrsistent-$pkgver.tar.gz"
|
|
LICENCE.mit)
|
|
sha512sums=('bdf36228f80ce1d018d5baadae5cfb5aa3d9fddcd5144dc644cd6e9fd8d315ecb9ec8c48a8fb9ef73b4af6fceb28f1b83020cc3b4138abb5728ba24cdbf03d8f'
|
|
'036bd5cc2a62b004576ecc50a84dc7d187d8108f52cb886f7e32bed324327af2dc132100e1c8f1dd2ce35b774f74898020f04a315e5137319deda18a449e791a')
|
|
|
|
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 pytest || warning "tests failed!!"
|
|
done
|
|
}
|
|
|
|
package_python3-pyrsistent() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-six")
|
|
|
|
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}" --optimize=1 --skip-build
|
|
|
|
install -Dm644 LICENCE.mit "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENCE.mit"
|
|
}
|
|
|
|
package_python2-pyrsistent() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-six")
|
|
|
|
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 --skip-build
|
|
|
|
install -Dm644 LICENCE.mit "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENCE.mit"
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-pyrsistent() {
|
|
package_python2-pyrsistent
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-pyrsistent() {
|
|
package_python3-pyrsistent
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-pyrsistent() {
|
|
package_python2-pyrsistent
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-pyrsistent() {
|
|
package_python3-pyrsistent
|
|
}
|