Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ jobs:
uses: docker/setup-qemu-action@v3

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.23.3
with:
package-dir: bindings/python
output-dir: wheelhouse

env:
# ---- Build selection ----
# Linux/Windows: Python 3.10, 3.11, 3.12
Expand All @@ -135,8 +136,6 @@ jobs:
CIBW_ENVIRONMENT_LINUX: |
TOKENIZER_ROOT=/project/build/install
ICU_ROOT=/project/icu
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014

# ---- macOS ----
CIBW_BEFORE_ALL_MACOS: bindings/python/tools/prepare_build_environment_macos.sh
Expand Down
11 changes: 6 additions & 5 deletions bindings/python/pyonmttok/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@
import ctypes
import glob
import os
from importlib import resources

import pkg_resources

module_name = sys.modules[__name__].__name__
package_dir = pkg_resources.resource_filename(module_name, "")
# Get the package directory safely (no setuptools)
package_dir = str(resources.files(__package__))

add_dll_directory = getattr(os, "add_dll_directory", None)
if add_dll_directory is not None:
add_dll_directory(package_dir)

for library in glob.glob(os.path.join(package_dir, "*.dll")):
ctypes.CDLL(library)

# isort: off
from pyonmttok._ext import (
BPELearner,
Casing,
Expand All @@ -31,6 +30,8 @@
is_valid_language,
set_random_seed,
)

# isort: on
from pyonmttok.version import __version__


Expand Down
2 changes: 1 addition & 1 deletion bindings/python/pyonmttok/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version information."""

__version__ = "1.38.0"
__version__ = "1.38.1"
3 changes: 2 additions & 1 deletion bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ requires = [
"pybind11>=2.10.4"
]
build-backend = "setuptools.build_meta"

[tool.isort]
profile = "black"
1 change: 0 additions & 1 deletion bindings/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import sys

import pybind11

from setuptools import Extension, find_packages, setup

include_dirs = [pybind11.get_include()]
Expand Down
4 changes: 2 additions & 2 deletions bindings/python/test/test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# isort: off
import copy
import itertools
import os
import pickle

import pytest

import pyonmttok
import pytest

_DATA_DIR = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "..", "..", "..", "test", "data"
Expand Down
Loading