summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorescape07072024-04-04 13:11:24 +0900
committerescape07072024-04-04 13:11:24 +0900
commit95c212c67915a7d254200d1d2c167ef6815585d3 (patch)
treee143c21f734abdda27d9c146a36933ea894300f6
parent2c943390fe6171386954a7973d3b25b0d9d15078 (diff)
downloadaur-95c212c67915a7d254200d1d2c167ef6815585d3.tar.gz
Patch Anki to ignore missing pip_system_certs module
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD6
-rw-r--r--ignore-pip_system_certs.patch15
3 files changed, 22 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b946f04238b0..44d40dd30f99 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -11,7 +11,6 @@ pkgbase = anki-bin
depends = python-flask
depends = python-flask-cors
depends = python-jsonschema
- depends = python-pip-system-certs
depends = python-pyqt6
depends = python-pyqt6-webengine
depends = python-send2trash
@@ -36,6 +35,7 @@ pkgbase = anki-bin
noextract = anki.png
noextract = anki.xml
noextract = anki.xpm
+ noextract = ignore-pip_system_certs.patch
source = https://files.pythonhosted.org/packages/cp39/a/anki/anki-24.04-cp39-abi3-manylinux_2_28_x86_64.whl
source = https://files.pythonhosted.org/packages/py3/a/aqt/aqt-24.04-py3-none-any.whl
source = runanki-24.04.py::https://raw.githubusercontent.com/ankitects/anki/24.04/qt/runanki.py
@@ -44,6 +44,7 @@ pkgbase = anki-bin
source = anki-24.04.png::https://raw.githubusercontent.com/ankitects/anki/24.04/qt/bundle/lin/anki.png
source = anki-24.04.xml::https://raw.githubusercontent.com/ankitects/anki/24.04/qt/bundle/lin/anki.xml
source = anki-24.04.xpm::https://raw.githubusercontent.com/ankitects/anki/24.04/qt/bundle/lin/anki.xpm
+ source = ignore-pip_system_certs.patch
sha256sums = cfc89e1608c9817f1f3fea156e64a7e8824dbf88e7dabc7d49c5f1ff63d8361c
sha256sums = db1f77a93b134fd516ba5524927b6de86cab2207a9be09fe50efe0bf77eac602
sha256sums = 9648e7e915f51f08e05c48ef5f39b4015922fe1cf3d7f2895535ef10ef4507ae
@@ -52,5 +53,6 @@ pkgbase = anki-bin
sha256sums = 97ad2134ef1a7686789c7becd8bd05dd8693cf0d3127951ca6ba7b29a80b402a
sha256sums = 2845a528fb3a064b67404a03d72bfaba9b421cb220b25228b815946c6553ce38
sha256sums = d814c62e38246b6e4ba73ee037647a29675925167518137f05a8f9e60c258b6e
+ sha256sums = 55b55ce37bc23782b479ee9dc0fe706032a400d447f890dc34b0a9e6b0d8a590
pkgname = anki-bin
diff --git a/PKGBUILD b/PKGBUILD
index 23d15a255c8c..fd485e1fe531 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,7 +22,6 @@ depends=(
'python-flask'
'python-flask-cors'
'python-jsonschema'
- 'python-pip-system-certs'
'python-pyqt6'
'python-pyqt6-webengine'
'python-send2trash'
@@ -63,6 +62,7 @@ source=(
"anki-$pkgver.png::https://raw.githubusercontent.com/ankitects/anki/$pkgver/qt/bundle/lin/anki.png"
"anki-$pkgver.xml::https://raw.githubusercontent.com/ankitects/anki/$pkgver/qt/bundle/lin/anki.xml"
"anki-$pkgver.xpm::https://raw.githubusercontent.com/ankitects/anki/$pkgver/qt/bundle/lin/anki.xpm"
+ "ignore-pip_system_certs.patch"
)
noextract=("${source[@]##*/}")
sha256sums=('cfc89e1608c9817f1f3fea156e64a7e8824dbf88e7dabc7d49c5f1ff63d8361c'
@@ -72,12 +72,14 @@ sha256sums=('cfc89e1608c9817f1f3fea156e64a7e8824dbf88e7dabc7d49c5f1ff63d8361c'
'53db2e5bfeb00aa249667e09466a34bfacb17b61097875a8cdd93ee1a9380b9a'
'97ad2134ef1a7686789c7becd8bd05dd8693cf0d3127951ca6ba7b29a80b402a'
'2845a528fb3a064b67404a03d72bfaba9b421cb220b25228b815946c6553ce38'
- 'd814c62e38246b6e4ba73ee037647a29675925167518137f05a8f9e60c258b6e')
+ 'd814c62e38246b6e4ba73ee037647a29675925167518137f05a8f9e60c258b6e'
+ '55b55ce37bc23782b479ee9dc0fe706032a400d447f890dc34b0a9e6b0d8a590')
package() {
python -m installer --destdir="$pkgdir" $_anki_whl
python -m installer --destdir="$pkgdir" $_aqt_whl
+ patch --directory="$pkgdir" --forward --strip=1 --input="$srcdir/ignore-pip_system_certs.patch"
install -Dm755 runanki-$pkgver.py "$pkgdir/usr/bin/anki"
install -Dm644 anki-$pkgver.1 "$pkgdir/usr/share/man/man1/anki.1"
install -Dm644 anki-$pkgver.desktop "$pkgdir/usr/share/applications/anki.desktop"
diff --git a/ignore-pip_system_certs.patch b/ignore-pip_system_certs.patch
new file mode 100644
index 000000000000..6a291920aad7
--- /dev/null
+++ b/ignore-pip_system_certs.patch
@@ -0,0 +1,15 @@
+diff --unified --recursive --text --color anki-bin/usr/lib/python3.11/site-packages/aqt/__init__.py new/usr/lib/python3.11/site-packages/aqt/__init__.py
+--- anki-bin/usr/lib/python3.11/site-packages/aqt/__init__.py 2024-04-04 13:01:44.960181070 +0900
++++ new/usr/lib/python3.11/site-packages/aqt/__init__.py 2024-04-04 13:05:10.340210819 +0900
+@@ -6,7 +6,10 @@
+ import logging
+ import sys
+
+-import pip_system_certs.wrapt_requests
++try:
++ import pip_system_certs.wrapt_requests
++except ModuleNotFoundError:
++ pass
+
+ if sys.version_info[0] < 3 or sys.version_info[1] < 9:
+ raise Exception("Anki requires Python 3.9+")