diff options
author | Luis Martinez | 2022-05-07 18:38:10 -0500 |
---|---|---|
committer | Luis Martinez | 2022-05-07 18:38:10 -0500 |
commit | 7264e2eb7e1e43f8f3863edde5468a0e6e35d3f4 (patch) | |
tree | bf5685176868275f69bd533b565f7a170fb100e3 /PKGBUILD | |
parent | f1fadf918824b2e6ca1efd18e56e4741e36d78b6 (diff) | |
download | aur-7264e2eb7e1e43f8f3863edde5468a0e6e35d3f4.tar.gz |
package cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 50 |
1 files changed, 34 insertions, 16 deletions
@@ -1,26 +1,44 @@ +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> # Contributor: Clint Valentine <valentine.clint@gmail.com> # Contributor: Dmitriy Morozov <archlinux@foxcub.org> -_name=fastcluster -pkgname=python-${_name} + +pkgname=python-fastcluster +_pkg="${pkgname#python-}" pkgver=1.2.6 -pkgrel=1 +pkgrel=2 pkgdesc="Fast hierarchical clustering routines for R and Python" -arch=(any) -url="https://pypi.org/project/${_name}" -license=('custom:BSD-2-clause') -depends=(python-numpy) -makedepends=(python-setuptools) -source=(https://pypi.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz) -sha512sums=('94a11ddd80fe219a91f1713230decfde761cd745a6ce0782e5cc0ab7d9818855d031be8c79f97256f0266fd6992a9fa4b0f5e7a30cb42387810fd8baff2a2135') +arch=('x86_64') +url="https://pypi.org/project/fastcluster" +license=('BSD') +depends=('python-numpy') +makedepends=( + 'python-setuptools' + 'python-build' + 'python-installer' + 'python-oldest-supported-numpy' + 'python-wheel') +checkdepends=('python-pytest' 'python-scipy') +changelog=NEWS.txt +source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkg::1}/$_pkg/$_pkg-$pkgver.tar.gz") +sha256sums=('aab886efa7b6bba7ac124f4498153d053e5a08b822d2254926b7206cdf5a8aa6') build() { - cd ${_name}-${pkgver} - export PYTHONHASHSEED=0 - python setup.py build + cd "$_pkg-$pkgver" + python -m build --wheel --no-isolation +} + +check() { + cd "$_pkg-$pkgver" + local _py="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')" + PYTHONPATH="$PWD/build/lib.linux-$CARCH-$_py" python setup.py test } package() { - cd ${_name}-${pkgver} - PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build - install -Dm 644 COPYING.txt -t "${pkgdir}/usr/share/licenses/${pkgname}" + cd "$_pkg-$pkgver" + PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s \ + "$_site/$_pkg-$pkgver.dist-info/COPYING.txt" \ + "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |