Skip to content

Commit ae4b83b

Browse files
authored
fix linux image and cibuildwheel version (#342)
* fix linux image and cibuildwheel version
1 parent 5aff297 commit ae4b83b

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,11 @@ jobs:
115115
uses: docker/setup-qemu-action@v3
116116

117117
- name: Build wheels
118-
uses: pypa/cibuildwheel@v2.11.2
118+
uses: pypa/cibuildwheel@v2.23.3
119119
with:
120120
package-dir: bindings/python
121121
output-dir: wheelhouse
122+
122123
env:
123124
# ---- Build selection ----
124125
# Linux/Windows: Python 3.10, 3.11, 3.12
@@ -135,8 +136,6 @@ jobs:
135136
CIBW_ENVIRONMENT_LINUX: |
136137
TOKENIZER_ROOT=/project/build/install
137138
ICU_ROOT=/project/icu
138-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
139-
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
140139
141140
# ---- macOS ----
142141
CIBW_BEFORE_ALL_MACOS: bindings/python/tools/prepare_build_environment_macos.sh

bindings/python/pyonmttok/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@
44
import ctypes
55
import glob
66
import os
7+
from importlib import resources
78

8-
import pkg_resources
9-
10-
module_name = sys.modules[__name__].__name__
11-
package_dir = pkg_resources.resource_filename(module_name, "")
9+
# Get the package directory safely (no setuptools)
10+
package_dir = str(resources.files(__package__))
1211

1312
add_dll_directory = getattr(os, "add_dll_directory", None)
1413
if add_dll_directory is not None:
1514
add_dll_directory(package_dir)
1615

1716
for library in glob.glob(os.path.join(package_dir, "*.dll")):
1817
ctypes.CDLL(library)
19-
18+
# isort: off
2019
from pyonmttok._ext import (
2120
BPELearner,
2221
Casing,
@@ -31,6 +30,8 @@
3130
is_valid_language,
3231
set_random_seed,
3332
)
33+
34+
# isort: on
3435
from pyonmttok.version import __version__
3536

3637

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version information."""
22

3-
__version__ = "1.38.0"
3+
__version__ = "1.38.1"

bindings/python/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ requires = [
55
"pybind11>=2.10.4"
66
]
77
build-backend = "setuptools.build_meta"
8-
8+
[tool.isort]
9+
profile = "black"

bindings/python/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import sys
33

44
import pybind11
5-
65
from setuptools import Extension, find_packages, setup
76

87
include_dirs = [pybind11.get_include()]

bindings/python/test/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
# isort: off
12
import copy
23
import itertools
34
import os
45
import pickle
56

6-
import pytest
7-
87
import pyonmttok
8+
import pytest
99

1010
_DATA_DIR = os.path.join(
1111
os.path.dirname(os.path.abspath(__file__)), "..", "..", "..", "test", "data"

0 commit comments

Comments
 (0)