Skip to content

Commit

Permalink
Migrate: Poetryに移行
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Oct 21, 2023
1 parent f8f56ae commit e2c04ca
Show file tree
Hide file tree
Showing 8 changed files with 1,069 additions and 20 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/generate_document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ jobs:
uses: taiki-e/install-action@cargo-binstall
- name: Create a venv
uses: ./.github/actions/create-venv
- name: pip install
run: pip install -r ./crates/voicevox_core_python_api/requirements.txt
- name: Install python dependencies
run: |
pip install --upgrade poetry
poetry install --with test
- name: mkdir public
run: mkdir -p public/apis/c_api
- name: cp docs/apis/index.html
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
python -m pip install --upgrade poetry
poetry install --with test
- name: Check code style for voicevox_core_python_api
run: |
black --check .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,10 @@ jobs:
python-version: "3.8"
- name: Set up Rust
uses: ./.github/actions/rust-toolchain-from-file
- name: venv作成
uses: ./.github/actions/create-venv
- run: pip install -r ./crates/voicevox_core_python_api/requirements.txt
- run: |
pip install --upgrade poetry
cd crates/voicevox_core_python_api
poetry install --with dev --with test
- run: cargo build -p voicevox_core_c_api -vv
- run: maturin build --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --locked
- run: maturin develop --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --locked
Expand All @@ -281,7 +282,6 @@ jobs:
cp -v ../../target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib/libonnxruntime.so.* . || true
cp -v ../../target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib/libonnxruntime.*.dylib . || true
pip install -r requirements-test.txt
pytest
build-and-test-java-api:
strategy:
Expand Down
1,036 changes: 1,036 additions & 0 deletions crates/voicevox_core_python_api/poetry.lock

Large diffs are not rendered by default.

26 changes: 23 additions & 3 deletions crates/voicevox_core_python_api/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[project]
[tool.poetry]
name = "voicevox_core"
requires-python = ">=3.8"
dependencies = ["numpy", "pydantic>=1.9.2,<2"]
version = "0.0.0"
description = "VOICEVOX CORE の Python バインディングです。"
authors = ["Hiroshiba <[email protected]>"]

[build-system]
requires = ["maturin>=0.13.2,<0.14"]
Expand All @@ -13,3 +14,22 @@ profile = "black"
[tool.maturin]
bindings = "pyo3"
skip-auditwheel = true # Linuxでlibonnxruntime.so.*の不在を許してもらう

[tool.poetry.dependencies]
python = ">=3.9,<3.13"
numpy = ">=1.26.1,<2"
pydantic = ">=1.9.2,<2"

[tool.poetry.group.docs.dependencies]
sphinx = "6.2.1"
pydata-sphinx-theme = "0.14.1"
sphinx-autoapi = "3.0.0"

[tool.poetry.group.dev.dependencies]
maturin = "0.13.7"

[tool.poetry.group.test.dependencies]
pytest = "7.3.1"
pytest-asyncio = "0.21.0"
black = "23.3.0"
isort = "5.12.0"
2 changes: 0 additions & 2 deletions crates/voicevox_core_python_api/requirements-dev.txt

This file was deleted.

3 changes: 0 additions & 3 deletions crates/voicevox_core_python_api/requirements-test.txt

This file was deleted.

4 changes: 0 additions & 4 deletions crates/voicevox_core_python_api/requirements.txt

This file was deleted.

0 comments on commit e2c04ca

Please sign in to comment.