Files
MINGW-packages/mingw-w64-python-olefile/PKGBUILD
Peter Budai a96d80966f Python: Multiple package updates (#4517)
* python-pandas: Update to 0.23.4

* python-scikit-learn: Update to 0.19.2

* python-ipykernel: Update to 4.9.0

* python-olefile: Update to 0.46

* python-openmdao: Update to 2.4.0

* python-networkx: Update to 2.2

* python-jupyter_client: fix dependencies

* python-ipykernel: Fix dependencies

* python-openmdao: Fix executables
2018-10-09 07:43:01 +03:00

69 lines
2.6 KiB
Bash

# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
_realname=olefile
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=0.46
pkgrel=1
arch=('any')
license=('BSD')
url="https://www.decalage.info/olefile"
depends=()
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools"
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
options=('staticlibs')
source=(${_realname}-${pkgver}.tar.gz::https://github.com/decalage2/olefile/archive/v${pkgver}.tar.gz)
sha256sums=('11d1a3810e50956c9360a4c76f1ecebf3e54f9d8406f75127bd0d296638488f4')
prepare() {
cd ${srcdir}
cp -r "${_realname}-${pkgver}" "python2-build-${CARCH}"
cp -r "${_realname}-${pkgver}" "python3-build-${CARCH}"
}
package_python3-olefile() {
pkgdesc="Python3 library to parse, read and write Microsoft OLE2 files (formerly OleFileIO_PL) (mingw-w64)"
depends+=("${MINGW_PACKAGE_PREFIX}-python3")
local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX})
local _py3basever=$(${MINGW_PREFIX}/bin/python3 -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))")
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=0
install -Dm644 doc/LICENSE.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
install -Dm644 README.md doc/* -t "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}/README"
}
package_python2-olefile() {
pkgdesc="Python2 library to parse, read and write Microsoft OLE2 files (formerly OleFileIO_PL) (mingw-w64)"
depends+=("${MINGW_PACKAGE_PREFIX}-python2")
local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX})
local _py2basever=$(${MINGW_PREFIX}/bin/python2 -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))")
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=0
install -Dm644 doc/LICENSE.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
install -Dm644 README.md doc/* -t "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}/README"
}
package_mingw-w64-i686-python2-olefile() {
package_python2-olefile
}
package_mingw-w64-i686-python3-olefile() {
package_python3-olefile
}
package_mingw-w64-x86_64-python2-olefile() {
package_python2-olefile
}
package_mingw-w64-x86_64-python3-olefile() {
package_python3-olefile
}