99 lines
3.2 KiB
Bash
99 lines
3.2 KiB
Bash
# Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com >
|
|
|
|
_realname=h5py
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=2.9.0
|
|
pkgrel=1
|
|
pkgdesc="General-purpose Python bindings for the HDF5 library (mingw-w64)"
|
|
arch=('any')
|
|
url="http://www.h5py.org"
|
|
license=('BSD')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-numpy"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-numpy"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-six"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-six"
|
|
"${MINGW_PACKAGE_PREFIX}-cython"
|
|
"${MINGW_PACKAGE_PREFIX}-cython2"
|
|
"${MINGW_PACKAGE_PREFIX}-gcc"
|
|
"${MINGW_PACKAGE_PREFIX}-hdf5"
|
|
"${MINGW_PACKAGE_PREFIX}-pkg-config")
|
|
source=(https://files.pythonhosted.org/packages/source/h/${_realname}/${_realname}-${pkgver}.tar.gz{,.asc}
|
|
001-mingw-python.patch
|
|
lzf_c.c.patch)
|
|
sha256sums=('9d41ca62daf36d6b6515ab8765e4c8c4388ee18e2a665701fef2b41563821002'
|
|
'SKIP'
|
|
'0a841ece7c08dbc5acdf247b3e73f3e1ca346940394a7a06ee30e8055189ce46'
|
|
'6d0126b881b5dcd637146d151341b72aa68eef760092272279072ec0bc4ceca9')
|
|
|
|
prepare() {
|
|
cd ${_realname}-${pkgver}
|
|
patch -p1 -i ${srcdir}/001-mingw-python.patch
|
|
patch -p1 -i ${srcdir}/lzf_c.c.patch
|
|
cd ${srcdir}
|
|
|
|
cp -a ${_realname}-${pkgver} ${_realname}-py2-${pkgver}
|
|
cp -a ${_realname}-${pkgver} ${_realname}-py3-${pkgver}
|
|
}
|
|
|
|
build() {
|
|
# build for python2
|
|
cd ${srcdir}/${_realname}-py2-${pkgver}
|
|
|
|
plain "doing setup.py build"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python2 setup.py build
|
|
plain "done setup.py build"
|
|
|
|
# build for python3
|
|
cd ${srcdir}/${_realname}-py3-${pkgver}
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python3 setup.py build
|
|
}
|
|
|
|
package_python2-h5py() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2-numpy"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-six"
|
|
"${MINGW_PACKAGE_PREFIX}-hdf5")
|
|
|
|
cd ${_realname}-py2-${pkgver}
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
DISTUTILS_DEBUG=1 ${MINGW_PREFIX}/bin/python2 setup.py install --skip-build \
|
|
--prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1
|
|
|
|
install -Dm644 licenses/license.txt \
|
|
"${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.txt"
|
|
}
|
|
|
|
package_python3-h5py() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3-numpy"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-six"
|
|
"${MINGW_PACKAGE_PREFIX}-hdf5")
|
|
|
|
cd ${_realname}-py3-${pkgver}
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python3 setup.py install --skip-build \
|
|
--prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1
|
|
|
|
install -Dm644 licenses/license.txt \
|
|
"${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE.txt"
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-h5py() {
|
|
package_python2-h5py
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-h5py() {
|
|
package_python3-h5py
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-h5py() {
|
|
package_python2-h5py
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-h5py() {
|
|
package_python3-h5py
|
|
}
|