summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorquietvoid2023-07-31 13:47:52 -0400
committerquietvoid2023-07-31 13:49:55 -0400
commite6558c4014424fdfab8a7b7c6a9416b1763072a7 (patch)
tree261bda2485a3b2dfb567087e9aa53f3fe13cf960
downloadaur-e6558c4014424fdfab8a7b7c6a9416b1763072a7.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore5
-rw-r--r--010-pybind11-rdp-remove-unwanted-pip-build-deps.patch15
-rw-r--r--PKGBUILD38
4 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4ecf3fcd7683
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = python-pybind11-rdp
+ pkgdesc = C++ implementation of the Ramer-Douglas-Peucker algorithm (binding to python via pybind11)
+ pkgver = v0.1.4
+ pkgrel = 1
+ url = https://github.com/cubao/pybind11-rdp
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ makedepends = cmake
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
+ depends = pybind11
+ provides = python-pybind11-rdp
+ conflicts = python-pybind11-rdp
+ source = pybind11-rdp-v0.1.4::git+https://github.com/cubao/pybind11-rdp.git#tag=v0.1.4
+ source = 010-pybind11-rdp-remove-unwanted-pip-build-deps.patch
+ sha256sums = SKIP
+ sha256sums = f48ac993fadc956bae9e095209f4ed61124a3e1e6c1560b85a0ced4acf1a51f1
+
+pkgname = python-pybind11-rdp
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7334925ab911
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!*.patch
diff --git a/010-pybind11-rdp-remove-unwanted-pip-build-deps.patch b/010-pybind11-rdp-remove-unwanted-pip-build-deps.patch
new file mode 100644
index 000000000000..f9dd82934d15
--- /dev/null
+++ b/010-pybind11-rdp-remove-unwanted-pip-build-deps.patch
@@ -0,0 +1,15 @@
+diff --git a/pyproject.toml b/pyproject.toml
+index 7b3b581..3dfff2f 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,9 +1,7 @@
+ [build-system]
+ requires = [
+ "setuptools>=42",
+- "wheel",
+- "ninja",
+- "cmake>=3.12",
++ "wheel"
+ ]
+ build-backend = "setuptools.build_meta"
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e22165f15f8c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: quietvoid <tcChlisop0@gmail.com>
+
+_libname=pybind11-rdp
+pkgname="python-${_libname}"
+pkgver=v0.1.4
+pkgrel=1
+pkgdesc='C++ implementation of the Ramer-Douglas-Peucker algorithm (binding to python via pybind11)'
+_rootdir="${_libname}-${pkgver}"
+arch=('x86_64')
+url='https://github.com/cubao/pybind11-rdp'
+license=('BSD')
+depends=('pybind11')
+makedepends=('git' 'cmake' 'python-build' 'python-installer' 'python-wheel')
+provides=('python-pybind11-rdp')
+conflicts=('python-pybind11-rdp')
+source=("${_rootdir}::git+https://github.com/cubao/pybind11-rdp.git#tag=${pkgver}"
+ '010-pybind11-rdp-remove-unwanted-pip-build-deps.patch')
+sha256sums=('SKIP'
+ 'f48ac993fadc956bae9e095209f4ed61124a3e1e6c1560b85a0ced4acf1a51f1')
+
+prepare() {
+ cd "${_rootdir}"
+ patch -Np1 -i "${srcdir}/010-pybind11-rdp-remove-unwanted-pip-build-deps.patch"
+
+ git submodule update --init --recursive
+}
+
+build() {
+ cd "${_rootdir}"
+ python -m build --wheel --no-isolation
+}
+
+package() {
+ cd "${_rootdir}"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}