blob: 6651bc4d076075ad7563813ce74ac53fe537caaf [file] [log] [blame] [edit]
# Maintainer: Patrick Stewart <patstew@gmail.com>
_realname=jupyter_client
pkgbase=mingw-w64-python-jupyter_client
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=6.1.12
pkgrel=1
pkgdesc="The reference implementation of the Jupyter protocol (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="https://jupyter.org/"
license=('BSD')
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-dateutil"
"${MINGW_PACKAGE_PREFIX}-python-entrypoints"
"${MINGW_PACKAGE_PREFIX}-python-jupyter_core"
"${MINGW_PACKAGE_PREFIX}-python-pyzmq"
"${MINGW_PACKAGE_PREFIX}-python-tornado"
"${MINGW_PACKAGE_PREFIX}-python-traitlets")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
source=("${_realname}-${pkgver}.tar.gz::https://github.com/jupyter/jupyter_client/archive/${pkgver}.tar.gz")
sha256sums=('77c52957adc148ed8c2b78358aed792a1e07ddef7aeae2114ea70b94b5051963')
prepare() {
cd "${srcdir}"
rm -rf python-build-${CARCH} | true
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
build() {
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py build
}
package() {
cd "${srcdir}/python-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install \
--prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=0 --skip-build
find "${pkgdir}/" -name "*.pyc" -delete
find "${pkgdir}/" -type d -empty -delete
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*-script.py; do
sed -e '1 { s/^#!.*$// }' -i ${_f}
done
install -Dm644 "COPYING.md" "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}