Skip to content

Commit

Permalink
fix: Update espeak, update oewn pointer and use uv for dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
mufeedali committed Feb 28, 2025
1 parent e78823a commit c235fa2
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 7 deletions.
4 changes: 2 additions & 2 deletions build-aux/flatpak/dev.mufeed.Wordbook.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
{
"type": "git",
"url": "https://github.com/espeak-ng/espeak-ng.git",
"tag": "1.51",
"commit": "2e9a5fccbb0095e87b2769e9249ea1f821918ecd"
"tag": "1.52.0",
"commit": "4870adfa25b1a32b4361592f1be8a40337c58d6c"
}
]
},
Expand Down
19 changes: 19 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
[project]
name = "Wordbook"
dynamic = ["version"]
requires-python = ">=3.12"
dependencies = [
"wn>=0.11.0",
]

[tool.uv]
package = false

[tool.setuptools]
packages = ["wordbook"]

[tool.isort]
profile = "black"
line_length = 120
Expand All @@ -10,3 +24,8 @@ line-length = 120

[tool.ruff]
line-length = 120

[dependency-groups]
dev = [
"pygobject-stubs>=2.12.0",
]
156 changes: 156 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions wordbook/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
from concurrent.futures import ThreadPoolExecutor
from functools import lru_cache
from shutil import rmtree
from typing import Callable, Dict, List
from typing import Callable

import wn
from wn import Form, Wordnet

from wordbook import utils

POOL = ThreadPoolExecutor()
WN_DB_VERSION = "oewn:2022"
WN_DB_VERSION = "oewn:2023"
wn.config.data_directory = os.path.join(utils.WN_DIR)
wn.config.allow_multithreading = True

Expand Down Expand Up @@ -275,7 +275,7 @@ def get_version_info(version):


@_threadpool
def get_wn_file(reloader: Callable) -> Dict[str, Wordnet | List[Form]]:
def get_wn_file(reloader: Callable) -> dict[str, Wordnet | list[Form]]:
"""Get the WordNet wordlist according to WordNet version."""
utils.log_info("Initializing WordNet.")
try:
Expand Down
8 changes: 6 additions & 2 deletions wordbook/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ configure_file(
install_dir: get_option('bindir')
)

myprogram = join_paths(meson.project_build_root(), meson.project_name(), meson.project_name())
program_executable = join_paths(
meson.project_build_root(),
meson.project_name(),
meson.project_name()
)
run_target('run',
command: [myprogram]
command: [program_executable]
)

wordbook_sources = [
Expand Down

0 comments on commit c235fa2

Please sign in to comment.