56 lines
1.8 KiB
Bash
56 lines
1.8 KiB
Bash
# Maintainer: Biswapriyo Nath <nathbappai@gmail.com>
|
|
|
|
_realname=rtree
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=1.4.1
|
|
pkgrel=1
|
|
pkgdesc="Rtree: spatial index for Python GIS (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url='https://rtree.readthedocs.io/'
|
|
msys2_repository_url='https://github.com/Toblerity/rtree/'
|
|
msys2_changelog_url='https://github.com/Toblerity/rtree/blob/main/CHANGES.rst'
|
|
msys2_references=(
|
|
'archlinux: python-rtree'
|
|
'gentoo: dev-python/rtree'
|
|
'purl: pkg:pypi/rtree'
|
|
)
|
|
license=('spdx:MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-spatialindex")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz"
|
|
"0001-fix-mingw-finder.patch")
|
|
sha256sums=('c6b1b3550881e57ebe530cc6cffefc87cd9bf49c30b37b894065a9f810875e46'
|
|
'46137c8b87c228a898f831c671d9952874e1109ab13312194ba7718b93858d66')
|
|
|
|
prepare() {
|
|
cd "${_realname}-${pkgver}"
|
|
patch -Np1 -i "${srcdir}"/0001-fix-mingw-finder.patch
|
|
}
|
|
|
|
build() {
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
|
|
|
python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd "python-build-${MSYSTEM}"
|
|
python -m pytest
|
|
}
|
|
|
|
package() {
|
|
cd "python-build-${MSYSTEM}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
|
|
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.txt"
|
|
}
|