Date: Saturday, November 7, 2020 @ 17:32:49 Author: demize Revision: 745899
upgpkg: anki 2.1.35-1 Added: anki/trunk/0005-Make-pyenv-target-just-create-venv.patch Modified: anki/trunk/0001-Move-aqt_data-to-sys.prefix-share.patch anki/trunk/0002-Remove-bad-build-steps-from-makefiles.patch anki/trunk/0003-Compile-.py-s-before-building-wheel.patch anki/trunk/0004-Disable-auto-updates.patch anki/trunk/PKGBUILD --------------------------------------------------+ 0001-Move-aqt_data-to-sys.prefix-share.patch | 12 +-- 0002-Remove-bad-build-steps-from-makefiles.patch | 56 +++++++++++++---- 0003-Compile-.py-s-before-building-wheel.patch | 18 ++--- 0004-Disable-auto-updates.patch | 12 +-- 0005-Make-pyenv-target-just-create-venv.patch | 45 ++++++++++++++ PKGBUILD | 67 ++++++++++----------- 6 files changed, 142 insertions(+), 68 deletions(-) Modified: 0001-Move-aqt_data-to-sys.prefix-share.patch =================================================================== --- 0001-Move-aqt_data-to-sys.prefix-share.patch 2020-11-07 17:31:19 UTC (rev 745898) +++ 0001-Move-aqt_data-to-sys.prefix-share.patch 2020-11-07 17:32:49 UTC (rev 745899) @@ -1,7 +1,7 @@ -From a0a9ac1aeb8b8678f1102aed81010a901ad8d9e1 Mon Sep 17 00:00:00 2001 +From 71c4f41d5408731496abe294ce202160b7f3912c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johan...@kyriasis.com> Date: Sun, 29 Mar 2020 06:24:43 +0200 -Subject: [PATCH 1/4] Move aqt_data to sys.prefix/share +Subject: [PATCH 1/5] Move aqt_data to sys.prefix/share MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -15,10 +15,10 @@ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py -index a0e12362..4d8c8c34 100644 +index b9a2983b..f97c5f19 100644 --- a/qt/aqt/utils.py +++ b/qt/aqt/utils.py -@@ -21,7 +21,7 @@ from aqt.theme import theme_manager +@@ -24,7 +24,7 @@ if TYPE_CHECKING: def aqt_data_folder() -> str: # wheel install? @@ -28,7 +28,7 @@ # running in place? dir = os.path.join(os.path.dirname(__file__), "..", "aqt_data") diff --git a/qt/setup.py b/qt/setup.py -index 38f4e2b7..bdda3baa 100644 +index 831532e0..da243f9b 100644 --- a/qt/setup.py +++ b/qt/setup.py @@ -8,7 +8,7 @@ import setuptools @@ -41,5 +41,5 @@ -- -2.26.2 +2.29.2 Modified: 0002-Remove-bad-build-steps-from-makefiles.patch =================================================================== --- 0002-Remove-bad-build-steps-from-makefiles.patch 2020-11-07 17:31:19 UTC (rev 745898) +++ 0002-Remove-bad-build-steps-from-makefiles.patch 2020-11-07 17:32:49 UTC (rev 745899) @@ -1,7 +1,7 @@ -From 5f8a3a14906d4ad20cd0d1be6b90e0922a5ba098 Mon Sep 17 00:00:00 2001 +From 2f3da2ef25943d468d6d992589979f1c92f3fb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johan...@kyriasis.com> Date: Sun, 29 Mar 2020 05:54:00 +0200 -Subject: [PATCH 2/4] Remove bad build steps from makefiles +Subject: [PATCH 2/5] Remove bad build steps from makefiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -8,18 +8,33 @@ Signed-off-by: Johannes Löthberg <johan...@kyriasis.com> --- + Makefile | 2 +- pylib/Makefile | 4 ++-- qt/Makefile | 2 +- + rslib/Makefile | 2 +- rspy/Makefile | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) + 5 files changed, 6 insertions(+), 6 deletions(-) +diff --git a/Makefile b/Makefile +index d99e115a..cffa2e30 100644 +--- a/Makefile ++++ b/Makefile +@@ -90,7 +90,7 @@ buildhash: + fi + + .PHONY: develop +-develop: pyenv buildhash prepare ++develop: pyenv buildhash + @set -eu -o pipefail ${SHELLFLAGS}; \ + . "${ACTIVATE_SCRIPT}"; \ + for dir in $(DEVEL); do \ diff --git a/pylib/Makefile b/pylib/Makefile -index b9e6aa63..feae25d8 100644 +index 5cb14e09..8d8388c3 100644 --- a/pylib/Makefile +++ b/pylib/Makefile @@ -41,7 +41,7 @@ all: check - PROTODEPS := $(wildcard ../proto/*.proto) + PROTODEPS := ../proto/backend.proto ../proto/fluent.proto -.build/py-proto: .build/dev-deps $(PROTODEPS) +.build/py-proto: $(PROTODEPS) @@ -26,17 +41,17 @@ protoc --proto_path=../proto --python_out=anki --mypy_out=anki $(PROTODEPS) perl -i'' -pe 's/from fluent_pb2/from anki.fluent_pb2/' anki/backend_pb2.pyi perl -i'' -pe 's/import fluent_pb2/import anki.fluent_pb2/' anki/backend_pb2.py -@@ -52,7 +52,7 @@ PROTODEPS := $(wildcard ../proto/*.proto) - python -m black anki/hooks.py +@@ -54,7 +54,7 @@ PROTODEPS := ../proto/backend.proto ../proto/fluent.proto + python -m black -t py36 anki/hooks.py @touch $@ --BUILD_STEPS := .build/vernum .build/run-deps .build/dev-deps .build/py-proto anki/buildinfo.py .build/hooks -+BUILD_STEPS := .build/vernum .build/py-proto anki/buildinfo.py +-BUILD_STEPS := .build/vernum .build/run-deps .build/dev-deps anki/buildinfo.py .build/py-proto .build/hooks ++BUILD_STEPS := .build/vernum .build/run-deps .build/dev-deps anki/buildinfo.py .build/py-proto # Checking ###################### diff --git a/qt/Makefile b/qt/Makefile -index 2ebee696..c0ba93e3 100644 +index 4fc6b482..b50d1868 100644 --- a/qt/Makefile +++ b/qt/Makefile @@ -64,7 +64,7 @@ TSDEPS := $(wildcard ts/src/*.ts) $(wildcard ts/scss/*.scss) @@ -48,11 +63,24 @@ # Checking ###################### +diff --git a/rslib/Makefile b/rslib/Makefile +index 7a18b53e..aa42c712 100644 +--- a/rslib/Makefile ++++ b/rslib/Makefile +@@ -25,7 +25,7 @@ fix: + clean: + rm -rf .build target + +-develop: .build/vernum ftl/repo ++develop: .build/vernum + + ftl/repo: + (cd ftl && ./scripts/fetch-latest-translations) diff --git a/rspy/Makefile b/rspy/Makefile -index 7506608d..01b7aff4 100644 +index 5eb9ea8f..ed401be9 100644 --- a/rspy/Makefile +++ b/rspy/Makefile -@@ -47,7 +47,7 @@ all: develop +@@ -52,7 +52,7 @@ all: develop develop: .build/develop @@ -60,7 +88,7 @@ +DEPS := .build/vernum ../meta/buildhash \ $(wildcard $(QT_FTL_TEMPLATES)/*.ftl) \ $(wildcard $(QT_FTL_LOCALES)/*/*.ftl) \ - $(shell "${FIND}" ../rslib/src -name '*.rs') $(wildcard ../proto/*) \ + $(shell "${FIND}" ../rslib/src -name '*.rs' -or -name '*.sql') $(wildcard ../proto/*) \ -- -2.26.2 +2.29.2 Modified: 0003-Compile-.py-s-before-building-wheel.patch =================================================================== --- 0003-Compile-.py-s-before-building-wheel.patch 2020-11-07 17:31:19 UTC (rev 745898) +++ 0003-Compile-.py-s-before-building-wheel.patch 2020-11-07 17:32:49 UTC (rev 745899) @@ -1,7 +1,7 @@ -From d1e3ca1144b664421facf30acd5524cd28961a3c Mon Sep 17 00:00:00 2001 +From 251f15df8ca3419b0cc92f6196f23b1186ff12bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johan...@kyriasis.com> Date: Mon, 4 May 2020 18:46:38 +0200 -Subject: [PATCH 3/4] Compile .py's before building wheel +Subject: [PATCH 3/5] Compile .py's before building wheel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -13,10 +13,10 @@ 2 files changed, 4 insertions(+) diff --git a/pylib/Makefile b/pylib/Makefile -index feae25d8..9d60bfe2 100644 +index 8d8388c3..78480c0c 100644 --- a/pylib/Makefile +++ b/pylib/Makefile -@@ -103,6 +103,8 @@ build: .build/build +@@ -105,6 +105,8 @@ build: .build/build .build/build: $(BUILD_STEPS) $(CHECKDEPS) rm -rf dist build @@ -26,13 +26,13 @@ rsync -a dist/*.whl ../dist/ touch $@ diff --git a/qt/Makefile b/qt/Makefile -index c0ba93e3..364fa890 100644 +index b50d1868..acf50d6e 100644 --- a/qt/Makefile +++ b/qt/Makefile -@@ -131,6 +131,8 @@ build: .build/build - - .build/build: $(BUILD_STEPS) $(CHECKDEPS) +@@ -137,6 +137,8 @@ build: .build/build + .build/build: $(BUILD_STEPS) $(CHECKDEPS) $(wildcard ../ts/dist/*) rm -rf dist build + rsync -a ../ts/dist/ aqt_data/web/ + python setup.py build + python -O -m compileall . python setup.py -q bdist_wheel @@ -39,5 +39,5 @@ rsync -a dist/*.whl ../dist/ touch $@ -- -2.26.2 +2.29.2 Modified: 0004-Disable-auto-updates.patch =================================================================== --- 0004-Disable-auto-updates.patch 2020-11-07 17:31:19 UTC (rev 745898) +++ 0004-Disable-auto-updates.patch 2020-11-07 17:32:49 UTC (rev 745899) @@ -1,7 +1,7 @@ -From 2c15f97b0e682f8b7616f14ea3f3caab653a78f7 Mon Sep 17 00:00:00 2001 +From bd0d5b6fde2ff0d3ca2fe8a6bdf59ce6e0fa1058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johan...@kyriasis.com> Date: Mon, 4 May 2020 17:57:29 +0200 -Subject: [PATCH 4/4] Disable auto updates +Subject: [PATCH 4/5] Disable auto updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -12,11 +12,11 @@ 1 file changed, 2 insertions(+) diff --git a/qt/aqt/update.py b/qt/aqt/update.py -index 2513d84c..37656733 100644 +index 8b179f65..a46618b8 100644 --- a/qt/aqt/update.py +++ b/qt/aqt/update.py -@@ -34,6 +34,8 @@ class LatestVersionFinder(QThread): - return d +@@ -33,6 +33,8 @@ class LatestVersionFinder(QThread): + } def run(self): + return @@ -25,5 +25,5 @@ return d = self._data() -- -2.26.2 +2.29.2 Added: 0005-Make-pyenv-target-just-create-venv.patch =================================================================== --- 0005-Make-pyenv-target-just-create-venv.patch (rev 0) +++ 0005-Make-pyenv-target-just-create-venv.patch 2020-11-07 17:32:49 UTC (rev 745899) @@ -0,0 +1,45 @@ +From 894a3e04560ca11651016ede480fb372e8a2d45b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johan...@kyriasis.com> +Date: Sat, 7 Nov 2020 17:01:04 +0100 +Subject: [PATCH 5/5] Make pyenv target just create venv +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Johannes Löthberg <johan...@kyriasis.com> +--- + Makefile | 18 +----------------- + 1 file changed, 1 insertion(+), 17 deletions(-) + +diff --git a/Makefile b/Makefile +index cffa2e30..d7233235 100644 +--- a/Makefile ++++ b/Makefile +@@ -61,23 +61,7 @@ all: run + # - modern pip required for wheel + # - add qt if missing + pyenv: +-# https://github.com/PyO3/maturin/issues/283 - Expected `python` to be a python interpreter inside a virtualenv +- set -eu -o pipefail ${SHELLFLAGS}; \ +- "${PYTHON_BIN}" -m venv pyenv; \ +- case "$$(uname -s)" in CYGWIN*|MINGW*|MSYS*) \ +- dos2unix "${ACTIVATE_SCRIPT}"; \ +- VIRTUAL_ENV="$$(pwd)"; \ +- VIRTUAL_ENV="$$(cygpath -m "$${VIRTUAL_ENV}")"; \ +- sed -i -- "s@VIRTUAL_ENV=\".*\"@VIRTUAL_ENV=\"$$(pwd)/pyenv\"@g" "${ACTIVATE_SCRIPT}"; \ +- sed -i -- "s@export PATH@export PATH; VIRTUAL_ENV=\"$${VIRTUAL_ENV}/pyenv\";@g" "${ACTIVATE_SCRIPT}"; \ +- ;; esac; \ +- . "${ACTIVATE_SCRIPT}"; \ +- python --version; \ +- python -m pip install --upgrade pip setuptools; \ +- ${ANKI_EXTRA_PIP}; \ +- if ! python -c 'import PyQt5' 2>/dev/null; then \ +- python -m pip install -r qt/requirements.qt; \ +- fi; ++ python -m venv pyenv --system-site-packages + + # update build hash + .PHONY: buildhash +-- +2.29.2 + Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-11-07 17:31:19 UTC (rev 745898) +++ PKGBUILD 2020-11-07 17:32:49 UTC (rev 745899) @@ -4,12 +4,12 @@ # Contributor: Michael 'manveru' Fellinger <m.fellin...@gmail.com> # Contributor: Dave Pretty <david dot pretty at gmail dot com> -_core_i18n=8d6ec08 -_desktop_ftl=04f26f2 -_desktop_i18n=0c64190 +_core_i18n=aefd745 +_desktop_ftl=51320cd +_desktop_i18n=67b07d5 pkgname=anki -pkgver=2.1.26 +pkgver=2.1.35 pkgrel=1 pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently" @@ -24,19 +24,22 @@ 'python-wheel' # anki + 'python-pysocks' # requests[socks] 'python-decorator' + 'python-protobuf' + 'python-orjson' 'python-distro' - # Currently not packaged. Falls back to stdlib json module. - # 'python-orjson' - 'python-protobuf' # aqt + 'python-send2trash' + 'python-markdown' 'python-jsonschema' - 'python-markdown' 'python-pyaudio' + 'python-pyqtwebengine' + 'python-flask' + # python-flask_cors unpackaged + 'python-waitress' 'python-pyqt5' - 'python-pyqtwebengine' - 'python-send2trash' ) makedepends=( 'git' @@ -43,7 +46,7 @@ 'rsync' 'maturin' - 'rustup' + 'rust' 'python-pip' 'python-mypy-protobuf' @@ -57,7 +60,7 @@ ) source=( - anki-$pkgver.tar.gz::https://github.com/ankitects/anki/archive/$pkgver.tar.gz + git+https://github.com/ankitects/anki.git#commit=84dcaa86380f9491c5f6240418235f87180831f7 ankitects-anki-core-i18n-$_core_i18n.tar.gz::https://github.com/ankitects/anki-core-i18n/tarball/$_core_i18n ankitects-anki-desktop-ftl-$_desktop_ftl.tar.gz::https://github.com/ankitects/anki-desktop-ftl/tarball/$_desktop_ftl @@ -67,22 +70,25 @@ 0002-Remove-bad-build-steps-from-makefiles.patch 0003-Compile-.py-s-before-building-wheel.patch 0004-Disable-auto-updates.patch + 0005-Make-pyenv-target-just-create-venv.patch ) -sha256sums=('f5a0c41f3eebe0e77de9d46f2a5cbbe20f7c3a4787f0f02e1d33f298428acbdf' - 'b1cfb3bd01d9133759e9ad1f349974a79e59f262778dbe6beb88446dc6d1e089' - '7a3ddb027ce8ba35f8ef36f2092536ac33c40bf6f6f3337fa9738e31edb22ee7' - '325dd0ed4150d143c42bd2f2140ecde0f0fef14695a908e688a5a27784e6f322' - '26162e6370e7763a8ec37e1690dc39c8b0f71e9d2524c452c330276b357cb18f' - '1bf87c408fd9e2a09cb39d8353af1e0dc64930ac819b4ffae555b14ed4644981' - '401d31ac5992c342778ba748eac6179da9d594e1ef93d0db8170fad643bab069' - '97048aa118281311f17b1e2154f55a2a2f1d84cbebbdc93459bca49e8f8f06fd') +sha256sums=('SKIP' + '36693fda3bb4515aa4832017155e6055e6063912bc7d62c918d1e0b3aaf8d424' + '30a8739badea5e2d8be263c2595e25534863d8d2af23608689ebface6a64787b' + '6500f5483d6121e9f07b64fac1bd00800107b01a353b8e15024ed30b773a26f1' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') prepare() { - cd anki-$pkgver + cd anki patch -p1 <"$srcdir"/0001-Move-aqt_data-to-sys.prefix-share.patch patch -p1 <"$srcdir"/0002-Remove-bad-build-steps-from-makefiles.patch patch -p1 <"$srcdir"/0003-Compile-.py-s-before-building-wheel.patch patch -p1 <"$srcdir"/0004-Disable-auto-updates.patch + patch -p1 <"$srcdir"/0005-Make-pyenv-target-just-create-venv.patch # Put translations in place. ln -sf "$srcdir"/ankitects-anki-core-i18n-*/ rslib/ftl/repo @@ -91,26 +97,21 @@ } build() { + cd anki + # Built into the shared libraries so that the Python component can check # that it has the same value. - cd anki-$pkgver/meta - echo arch-linux-$pkgver-$pkgrel > buildhash + echo arch-linux-$pkgver-$pkgrel > meta/buildhash - # rust ankirspy module - cd ../rspy - make build + # Installs development modules in venv, which is required by scripts used + # by various make targets. The dependencies between targets are completely broken. + make develop - # python anki module - cd ../pylib make build - - # python aqt module - cd ../qt - make build } package() { - cd anki-$pkgver + cd anki PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps dist/*.whl