Skip to content

Commit

Permalink
Build wheel for Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
jkawamoto committed Aug 9, 2024
1 parent b692ece commit 02d91a0
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ make install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/

# Build the wheels
for PYVER in cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311; do
for PYVER in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312; do
# build the wheels
/opt/python/$PYVER/bin/pip wheel /github/workspace -w /github/workspace/wheels || { echo "Failed while buiding $PYVER wheel"; exit 1; }
done
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ jobs:
build_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Cache mecab
id: cache-mecab
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: mecab
key: mecab-build
Expand Down Expand Up @@ -46,15 +46,15 @@ jobs:
env:
arch: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Cache mecab
id: cache-mecab
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/mecab_${{ matrix.arch }}
key: mecab-build-${{ matrix.arch }}
Expand All @@ -79,9 +79,9 @@ jobs:
uses: ./.github/workflows/actions_aarch64/build_wheels/

- name: Upload Wheels
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: manylinux-wheels
name: manylinux-wheels-${{ matrix.arch }}
path: manylinux-wheels
- name: Publish to PyPI if tagged
if: startsWith(github.ref, 'refs/tags')
Expand Down
22 changes: 9 additions & 13 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ on: [push]

jobs:
build_osx:
runs-on: macos-latest
runs-on: macos-13
strategy:
max-parallel: 5
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
include:
- python-version: 3.6
py-short: 36
py-short2: 36m
- python-version: 3.7
py-short: 37
py-short2: 37m
- python-version: 3.8
py-short: 38
py-short2: 38
Expand All @@ -28,11 +22,13 @@ jobs:
- python-version: "3.11"
py-short: 311
py-short2: 311

- python-version: "3.12"
py-short: 312
py-short2: 312
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down Expand Up @@ -63,9 +59,9 @@ jobs:
# Check if libmecab.2.dylib is included
unzip -t $path_to_wheel
- name: Upload Wheels
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: osx-wheels
name: osx-wheels-${{ matrix.python-version }}
path: dist
- name: Check wheels
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10", "3.11" ]
python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12" ]
env:
PYTHON: python${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: docker build -t mecab-py .
- name: setup and test
run: docker run -v $(pwd):/workdir -w /workdir mecab-py sh -c "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ && $PYTHON -m pip install pytest wheel mecab-ko-dic && $PYTHON -m pip install -e . && $PYTHON -m pytest"
19 changes: 8 additions & 11 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
include:
- python-version: 3.6
py-short: 36
py-short2: 36m
- python-version: 3.7
py-short: 37
py-short2: 37m
- python-version: 3.8
py-short: 38
py-short2: 38
Expand All @@ -28,10 +22,13 @@ jobs:
- python-version: "3.11"
py-short: 311
py-short2: 311
- python-version: "3.12"
py-short: 312
py-short2: 312
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache mecab
Expand All @@ -53,9 +50,9 @@ jobs:
run: |
python setup.py bdist_wheel
- name: Upload Wheel
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: win-wheels
name: win-wheels-${{ matrix.python-version }}
path: dist
- name: Check wheels
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ def _get_pkg_data_files(self, package):
classifiers = [
"Development Status :: 6 - Mature",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: Korean",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27,py36,py37
envlist = py38,py39,py310,py311,py312

[testenv]
deps =
Expand Down

0 comments on commit 02d91a0

Please sign in to comment.