aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2021-04-15 16:00:49 +0200
committerKevin Daudt <kdaudt@alpinelinux.org>2021-07-26 16:17:42 +0000
commitd264cb27f61177643d19c5497b3ff3e598cb1be0 (patch)
treeac5221d6c6ecac0dc735fa100a7db015b1f01132 /community
parent02af6407c64688caeaaf82c794bcf34025e46577 (diff)
downloadaports-d264cb27f61177643d19c5497b3ff3e598cb1be0.tar.gz
aports-d264cb27f61177643d19c5497b3ff3e598cb1be0.tar.bz2
aports-d264cb27f61177643d19c5497b3ff3e598cb1be0.tar.xz
community/py3-inotify: move from testing
Diffstat (limited to 'community')
-rw-r--r--community/py3-inotify/APKBUILD33
-rw-r--r--community/py3-inotify/force-c-ext.patch14
-rw-r--r--community/py3-inotify/riscv64-and-aarch64.patch17
3 files changed, 64 insertions, 0 deletions
diff --git a/community/py3-inotify/APKBUILD b/community/py3-inotify/APKBUILD
new file mode 100644
index 0000000000..a2a3860d09
--- /dev/null
+++ b/community/py3-inotify/APKBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py3-inotify
+_pkgname=pyinotify
+pkgver=0.9.6
+pkgrel=8
+pkgdesc="Linux filesystem events monitoring"
+options="!check" # No testsuite
+url="http://pypi.python.org/pypi/pyinotify"
+arch="all"
+license="MIT"
+makedepends="py3-setuptools python3-dev"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
+ riscv64-and-aarch64.patch
+ force-c-ext.patch
+ "
+builddir="$srcdir"/$_pkgname-$pkgver
+
+replaces="py-inotify" # Backwards compatibility
+provides="py-inotify=$pkgver-r$pkgrel" # Backwards compatibility
+
+build() {
+ python3 setup.py build
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="
+b52de43293b06b32236e90b7c33fac061f3095cd7d4aecec89a099d56020db1a85440ab9dcc8b521238c001fc49a1f37d1b16d621bc1acab4d7273aebcaadbc5 pyinotify-0.9.6.tar.gz
+83c2f30461b43736088b47cc528ca058cc8975367c48c89bead53a48f9d65b34f267085178d815960c88958f47c138a6f133479b8961f1f1ff51b15bc61d1378 riscv64-and-aarch64.patch
+28fe821c7fd4edf5f359c2d6026bfe95477ed167ea6948b3785d3c1708513c0e038dd4d9f3988a26c02c43bfaac9acb0357ee7edd6d5b0b7ae6c40000e31c485 force-c-ext.patch
+"
diff --git a/community/py3-inotify/force-c-ext.patch b/community/py3-inotify/force-c-ext.patch
new file mode 100644
index 0000000000..4c86ca7535
--- /dev/null
+++ b/community/py3-inotify/force-c-ext.patch
@@ -0,0 +1,14 @@
+diff --git a/setup.py b/setup.py
+index 15d68ab..5f6d7a6 100755
+--- a/setup.py
++++ b/setup.py
+@@ -3,7 +3,7 @@
+ # Set True to force compile native C-coded extension providing direct access
+ # to inotify's syscalls. If set to False this extension will only be compiled
+ # if no inotify interface from ctypes is found.
+-compile_ext_mod = False
++compile_ext_mod = True
+
+ # import statements
+ import os
+
diff --git a/community/py3-inotify/riscv64-and-aarch64.patch b/community/py3-inotify/riscv64-and-aarch64.patch
new file mode 100644
index 0000000000..1a60fcf798
--- /dev/null
+++ b/community/py3-inotify/riscv64-and-aarch64.patch
@@ -0,0 +1,17 @@
+Both riscv64 and aarch64 use the system call numbers defined in
+include/uapi/asm-generic/unistd.h in the Linux source tree.
+
+diff -upr pyinotify-0.9.6.orig/common/inotify_syscalls.c pyinotify-0.9.6/common/inotify_syscalls.c
+--- pyinotify-0.9.6.orig/common/inotify_syscalls.c 2021-07-21 11:09:23.208274056 +0200
++++ pyinotify-0.9.6/common/inotify_syscalls.c 2021-07-21 11:10:19.838321429 +0200
+@@ -60,6 +60,10 @@
+ # define __NR_inotify_init 316
+ # define __NR_inotify_add_watch 317
+ # define __NR_inotify_rm_watch 318
++# elif defined (__aarch64__) || defined(__riscv)
++# define __NR_inotify_init 26
++# define __NR_inotify_add_watch 27
++# define __NR_inotify_rm_watch 28
+ # elif defined (__sh__)
+ # define __NR_inotify_init 290
+ # define __NR_inotify_add_watch 291