archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-shapely / repos / community-x86_64 / PKGBUILD
bloba9ffc04201c19716d84568cc6b0bb3fa7369024e
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Bruno Pagani <archange@archlinux.org>
3 # Contributor: David Verelst <david dot verelst at gmail com>
4 # Contributor: richli
6 pkgname=python-shapely
7 pkgver=2.0.1
8 pkgrel=1
9 pkgdesc="Manipulation and analysis of geometric objects in the Cartesian plane"
10 arch=(x86_64)
11 url="https://pypi.python.org/pypi/Shapely"
12 license=(BSD)
13 depends=(geos python)
14 optdepends=('python-numpy: for shapely.vectorized submodule')
15 makedepends=(python-build python-installer python-setuptools python-wheel python-numpy cython)
16 checkdepends=(python-pytest)
17 source=("https://pypi.io/packages/source/s/shapely/shapely-${pkgver}.tar.gz")
18 sha512sums=('3468e49392bc7f6f62a3c26308d9e75d853678d509bb6869dcf745f2b6dda1f654589a84cb967897f63cc071f678b2ae4cde4382ff27e11ceb891f515392b96a')
20 build() {
21   cd shapely-$pkgver
22   python -m build --wheel --no-isolation --skip-dependency-check
25 check() {
26   local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
27   cd shapely-$pkgver/build/lib.linux-x86_64-cpython-${python_version}
28   PYTHONPATH="$PWD" pytest -vv --color=yes
31 package() {
32   cd shapely-$pkgver
33   python -m installer --destdir="$pkgdir" dist/*.whl
34   install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/