summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorgroctel2023-11-26 11:19:02 +0100
committergroctel2023-11-26 11:19:02 +0100
commit1ad222496bd6b3df7194379c33302070a5405180 (patch)
tree900c896ad0c5281d711076970ad39f278390021c /PKGBUILD
parent31e2b5d26b4c9c035f60b649b13d347c5e4870e6 (diff)
downloadaur-python-mapbox-earcut.tar.gz
Updated installation method to follow PEP 517
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 13 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b34cf61c27a4..efc9d03e0b97 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,37 +7,31 @@ pkgver=1.0.1
pkgrel=1
pkgdesc="Python bindings for the C++ implementation of the Mapbox Earcut library."
-arch=('any')
-license=('custom')
+arch=("any")
+license=("custom")
url="https://github.com/skogler/mapbox_earcut_python"
source=("$url/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('cdb32585cbaf74c15e59af0ae70d983dd2f9bc9cfe1b59b3eadc4d442f7d962241854b589a035deae67cacd9334833b911d0981f0d417fe587348fc7d24f0c0a')
-depends=('python')
+depends=("python")
makedepends=(
- 'cmake'
- 'git'
- 'pybind11'
- 'python-pip'
- 'python-setuptools'
+ "pybind11"
+ "python-build"
+ "python-installer"
+ "python-setuptools"
+ "python-wheel"
)
-prepare ()
-{
- cd "$srcdir/$_name-$pkgver"
- git clone https://github.com/pybind/pybind11
-}
-
build ()
{
- cd "$srcdir/$_name-$pkgver"
- python setup.py build
+ cd "$srcdir/$_name-$pkgver" || exit
+ python -m build --wheel --no-isolation
}
package ()
{
- cd "$srcdir/$_name-$pkgver"
- python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
- install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "$srcdir/$_name-$pkgver" || exit
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}