78 lines
2.4 KiB
Bash
78 lines
2.4 KiB
Bash
# Maintainer: Patrick Stewart <patstew@gmail.com>
|
|
|
|
_realname=qtconsole
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=4.4.1
|
|
pkgrel=1
|
|
pkgdesc="A rich Qt-based console for working with Jupyter kernels, supporting rich media output, session export, and more (mingw-w64)"
|
|
arch=('any')
|
|
url="https://jupyter.org/"
|
|
license=('BSD')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
|
source=("${_realname}-${pkgver}.tar.gz::https://github.com/jupyter/qtconsole/archive/${pkgver}.tar.gz")
|
|
sha256sums=('93e0b623f86919a5e81a3a57919ad2831cbde668f80cb24dc1372cecd39adca2')
|
|
|
|
all_build() {
|
|
cd "${srcdir}/${_realname}-${pkgver}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/${1} setup.py install \
|
|
--prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=0
|
|
|
|
find "${pkgdir}/" -name "*.pyc" -delete
|
|
find "${pkgdir}/" -type d -empty -delete
|
|
|
|
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
|
# fix python command in files
|
|
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*; do
|
|
sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f}
|
|
done
|
|
}
|
|
|
|
package_python3-qtconsole() {
|
|
local interpreter=python3
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-jupyter_core"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-jupyter_client"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-pyqt5")
|
|
|
|
all_build ${interpreter}
|
|
|
|
install -Dm644 "LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
|
|
}
|
|
|
|
package_python2-qtconsole() {
|
|
local interpreter=python2
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-jupyter_core"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-jupyter_client"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-pyqt5")
|
|
|
|
all_build ${interpreter}
|
|
|
|
install -Dm644 "LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
|
|
|
|
cd "${pkgdir}${MINGW_PREFIX}"/bin
|
|
for _f in *; do
|
|
mv ${_f} ${_f/%.*/}2${_f/${_f/%.*/}/}
|
|
done
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-qtconsole() {
|
|
package_python2-qtconsole
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-qtconsole() {
|
|
package_python3-qtconsole
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-qtconsole() {
|
|
package_python2-qtconsole
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-qtconsole() {
|
|
package_python3-qtconsole
|
|
}
|