From 4d2bc5e6b8e43e262f6e11105d6e6a341ecade6b Mon Sep 17 00:00:00 2001 From: xxyzz Date: Sat, 15 Jan 2022 14:57:39 +0800 Subject: [PATCH] Install thinc-apple-ops on M1 mac, require native calibre build --- __init__.py | 2 +- data/spacy.json | 2 +- data/spacy_extra.json | 6 ++++++ deps.py | 4 ++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 59ef55b..8974c73 100644 --- a/__init__.py +++ b/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 from calibre.customize import InterfaceActionBase -VERSION = (3, 16, 2) +VERSION = (3, 17, 0) class WordDumbDumb(InterfaceActionBase): diff --git a/data/spacy.json b/data/spacy.json index 298325a..103dc79 100644 --- a/data/spacy.json +++ b/data/spacy.json @@ -37,7 +37,7 @@ }, "numpy": { "compiled": true, - "version": "1.22.0" + "version": "1.22.1" }, "packaging": { "compiled": false, diff --git a/data/spacy_extra.json b/data/spacy_extra.json index d498648..76dc1f8 100644 --- a/data/spacy_extra.json +++ b/data/spacy_extra.json @@ -18,5 +18,11 @@ "compiled": true, "version": "0.0.28" } + }, + "apple": { + "thinc-apple-ops": { + "compiled": true, + "version": "0.0.5" + } } } \ No newline at end of file diff --git a/deps.py b/deps.py index 1b25320..7414928 100644 --- a/deps.py +++ b/deps.py @@ -101,3 +101,7 @@ def install_extra_deps(self): if (lang := self.model[:2]) in data: for pkg, value in data[lang].items(): self.pip_install(pkg, value['version'], value['compiled']) + + if ismacos and self.machine == 'arm64': + for pkg, value in data['apple'].items(): + self.pip_install(pkg, value['version'], value['compiled'])