Skip to content

Commit

Permalink
feat: add py12 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kamoo1 committed Nov 5, 2024
1 parent 4b1f82b commit 5891380
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:

semantic-release:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.12"]
permissions:
contents: write
id-token: write
Expand All @@ -36,10 +39,11 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- name: Set up Python 3.9
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: ${{ matrix.python-version }}
# automatically handles py-versions and distros
cache: pip
- name: Install dependencies
run: |
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PATH_VENDORS := $(PATH_SRC)/vendors
ANKI_ADDON_PATH_WIN := C:/Users/$(USER)/AppData/Roaming/Anki2/addons21/ankiwordfreq
ANKI_ADDON_PATH_LINUX := $$HOME/.local/share/Anki2/addons21/ankiwordfreq
ANKI_ADDON_PATH_MACOS := $$HOME/Library/Application\ Support/Anki2/addons21/ankiwordfreq
PYTHON_TAG := $(shell python3 -c "import sysconfig; print(f'cp{sysconfig.get_config_var(\"py_version_nodot\")}')")

ifeq ($(shell uname), Linux)
ANKI_ADDON_PATH := $(ANKI_ADDON_PATH_LINUX)
Expand All @@ -24,14 +25,14 @@ CALL_FMD := "scripts/fix_mecab_dll.sh"
all:
mkdir -p dist && \
$(MAKE) vendors && \
FILE=$$(poetry version | tr ' ' '_').ankiaddon && \
FILE=$$(poetry version | tr ' ' '_')_$(PYTHON_TAG).ankiaddon && \
cd $(PATH_SRC) && zip -q -r ../dist/$$FILE *

.PHONY: cjk
cjk:
mkdir -p dist && \
$(MAKE) vendors && \
FILE=$$(poetry version | tr ' ' '_')_cjk.ankiaddon && \
FILE=$$(poetry version | tr ' ' '_')_cjk_$(PYTHON_TAG).ankiaddon && \
cd $(PATH_SRC) && zip -q -r ../dist/$$FILE *


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ Supported languages listed [here](https://github.com/rspeer/wordfreq/blob/ce5307

## Known Issues
- For Chinese Japanese and Korean (CJK) support, you can find a CJK version in [GitHub releases](https://github.com/kamoo1/anki-word-freq/releases). It's too large for AnkiWeb.
- Tested on Windows and Linux, should be compatible with macOS.
- Some custom tokenizers in the dependencies write logs to *stderr* (e.g. `jieba`), this will get displayed in a error popup window in Anki, but can be safely ignored.
- Some custom tokenizers in the dependencies write logs to *stderr* (e.g. `jieba`), this will get displayed in a error popup window in Anki, but can be safely ignored.
- Tested on Windows and Linux, should be compatible with macOS. For arch users with AUR anki, choose py12 versions in [GitHub releases](https://github.com/kamoo1/anki-word-freq/releases).

0 comments on commit 5891380

Please sign in to comment.