46 lines
1.6 KiB
Bash
46 lines
1.6 KiB
Bash
# Maintainer: Sarah Ottinger <schalaalexiazeal@gmail.com>
|
|
|
|
_realname=jsonpointer
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=2.3
|
|
pkgrel=1
|
|
pkgdesc='Identify specific nodes in a JSON document (RFC 6901) (mingw-w64)'
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
|
url="https://python-json-pointer.readthedocs.org/"
|
|
license=('spdx:BSD-3-Clause')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
|
source=("https://files.pythonhosted.org/packages/source/${_realname:0:1}/${_realname//-/_}/${_realname//-/_}-${pkgver}.tar.gz")
|
|
sha256sums=('97cba51526c829282218feb99dab1b1e6bdf8efd1c43dc9d57be093c0d69c99a')
|
|
|
|
prepare() {
|
|
rm -rf python-build-${MSYSTEM} | true
|
|
cp -r "${_realname//-/_}-$pkgver" "python-build-${MSYSTEM}"
|
|
}
|
|
|
|
build() {
|
|
msg "Python build for ${MSYSTEM}"
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python tests.py || warning "Tests failed"
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
|
|
--root="${pkgdir}" --optimize=1 --skip-build
|
|
|
|
local _PREFIX_WIN=$(cygpath -m ${MINGW_PREFIX})
|
|
sed -s "s|${_PREFIX_WIN}/bin/||g" -i "${pkgdir}${MINGW_PREFIX}/bin/jsonpointer"
|
|
|
|
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.txt"
|
|
}
|