diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 90baa9a6b..79ed1de52 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -27,7 +27,7 @@ jobs: uses: ./.github/actions/prepare_python - name: Make documents - run: PYTHONPATH=. python build_util/make_docs.py + run: PYTHONPATH=. python tools/make_docs.py - name: Deploy documents to GitHub Pages uses: peaceiris/actions-gh-pages@v4 diff --git a/.github/workflows/build-engine-container.yml b/.github/workflows/build-engine-container.yml index 86c8215c1..f37d14fe5 100644 --- a/.github/workflows/build-engine-container.yml +++ b/.github/workflows/build-engine-container.yml @@ -120,7 +120,7 @@ jobs: - name: Merge VOICEVOX RESOURCE env: DOWNLOAD_RESOURCE_PATH: download/resource - run: bash build_util/process_voicevox_resource.bash + run: bash tools/process_voicevox_resource.bash - name: Build and Deploy Docker image uses: docker/build-push-action@v5 diff --git a/.github/workflows/build-engine-package.yml b/.github/workflows/build-engine-package.yml index f979c3af6..566582980 100644 --- a/.github/workflows/build-engine-package.yml +++ b/.github/workflows/build-engine-package.yml @@ -290,7 +290,7 @@ jobs: - name: Prepare custom PyInstaller if: startsWith(matrix.os, 'windows-') - run: ./build_util/modify_pyinstaller.bash + run: ./tools/modify_pyinstaller.bash - name: Download pyopenjtalk dictionary run: | @@ -409,7 +409,7 @@ jobs: - name: Merge RESOURCE env: DOWNLOAD_RESOURCE_PATH: download/resource - run: bash build_util/process_voicevox_resource.bash + run: bash tools/process_voicevox_resource.bash # VOICEVOX CORE - name: Prepare CORE cache @@ -441,7 +441,7 @@ jobs: - name: Generate licenses.json run: | OUTPUT_LICENSE_JSON_PATH=resources/engine_manifest_assets/dependency_licenses.json \ - bash build_util/create_venv_and_generate_licenses.bash + bash tools/create_venv_and_generate_licenses.bash # FIXME: VOICEVOX (editor) cannot build without licenses.json cp resources/engine_manifest_assets/dependency_licenses.json licenses.json @@ -547,7 +547,7 @@ jobs: - name: Code signing if: github.event.inputs.code_signing == 'true' && startsWith(matrix.os, 'windows-') - run: bash build_util/codesign.bash "dist/run/run.exe" + run: bash tools/codesign.bash "dist/run/run.exe" env: ESIGNERCKA_USERNAME: ${{ secrets.ESIGNERCKA_USERNAME }} ESIGNERCKA_PASSWORD: ${{ secrets.ESIGNERCKA_PASSWORD }} diff --git a/.github/workflows/test-engine-container.yml b/.github/workflows/test-engine-container.yml index b84276b43..91163221a 100644 --- a/.github/workflows/test-engine-container.yml +++ b/.github/workflows/test-engine-container.yml @@ -85,4 +85,4 @@ jobs: exit 1 - name: Test ENGINE application docker container - run: python build_util/check_release_build.py --skip_run_process --dist_dir dist/ + run: python tools/check_release_build.py --skip_run_process --dist_dir dist/ diff --git a/.github/workflows/test-engine-package.yml b/.github/workflows/test-engine-package.yml index 025c5ee4e..3e9dc1a18 100644 --- a/.github/workflows/test-engine-package.yml +++ b/.github/workflows/test-engine-package.yml @@ -82,4 +82,4 @@ jobs: run: chmod +x dist/run - name: Test ENGINE package - run: python build_util/check_release_build.py --dist_dir dist/ + run: python tools/check_release_build.py --dist_dir dist/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af4d06c56..7df025809 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Check licenses - run: OUTPUT_LICENSE_JSON_PATH=/dev/null bash build_util/create_venv_and_generate_licenses.bash + run: OUTPUT_LICENSE_JSON_PATH=/dev/null bash tools/create_venv_and_generate_licenses.bash - name: Test names by checking typo if: matrix.os == 'ubuntu-20.04' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef2784e02..5ab1629c7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -305,7 +305,7 @@ safety check -r requirements.txt -r requirements-dev.txt -r requirements-build.t ```bash OUTPUT_LICENSE_JSON_PATH=licenses.json \ -bash build_util/create_venv_and_generate_licenses.bash +bash tools/create_venv_and_generate_licenses.bash # モックでビルドする場合 pyinstaller --noconfirm run.spec @@ -328,7 +328,7 @@ fork したリポジトリで Actions を ON にし、workflow_dispatch で`buil 次のコマンドで API ドキュメントを手動で作成することができます。 ```bash -PYTHONPATH=. python build_util/make_docs.py +PYTHONPATH=. python tools/make_docs.py ``` ## GitHub Actions diff --git a/Dockerfile b/Dockerfile index 5b0d59b72..b86551232 100644 --- a/Dockerfile +++ b/Dockerfile @@ -231,8 +231,8 @@ ADD ./voicevox_engine /opt/voicevox_engine/voicevox_engine ADD ./docs /opt/voicevox_engine/docs ADD ./run.py ./presets.yaml ./engine_manifest.json /opt/voicevox_engine/ ADD ./resources /opt/voicevox_engine/resources -ADD ./build_util/generate_licenses.py /opt/voicevox_engine/build_util/ -ADD ./build_util/licenses /opt/voicevox_engine/build_util/licenses +ADD ./tools/generate_licenses.py /opt/voicevox_engine/tools/ +ADD ./tools/licenses /opt/voicevox_engine/tools/licenses # Replace version ARG VOICEVOX_ENGINE_VERSION=latest @@ -254,7 +254,7 @@ RUN < /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json + gosu user /opt/python/bin/python3 tools/generate_licenses.py > /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json cp /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json /opt/voicevox_engine/licenses.json EOF diff --git a/README.md b/README.md index 643f5999e..a9ad1ca15 100644 --- a/README.md +++ b/README.md @@ -573,7 +573,7 @@ DYLD_LIBRARY_PATH="/path/to/onnx" python run.py --voicelib_dir="/path/to/voicevo python -m pip install -r requirements-build.txt OUTPUT_LICENSE_JSON_PATH=licenses.json \ -bash build_util/create_venv_and_generate_licenses.bash +bash tools/create_venv_and_generate_licenses.bash # モックでビルドする場合 pyinstaller --noconfirm run.spec @@ -718,7 +718,7 @@ VOICEVOX エディターにうまく読み込ませられないときは、エ 次のコマンドで API ドキュメントを手動で作成することができます。 ```bash -PYTHONPATH=. python build_util/make_docs.py +PYTHONPATH=. python tools/make_docs.py ``` ### GitHub Actions diff --git a/build_util/check_release_build.py b/tools/check_release_build.py similarity index 100% rename from build_util/check_release_build.py rename to tools/check_release_build.py diff --git a/build_util/codesign.bash b/tools/codesign.bash similarity index 100% rename from build_util/codesign.bash rename to tools/codesign.bash diff --git a/build_util/create_venv_and_generate_licenses.bash b/tools/create_venv_and_generate_licenses.bash similarity index 91% rename from build_util/create_venv_and_generate_licenses.bash rename to tools/create_venv_and_generate_licenses.bash index 4e3d25fe8..09d9154d8 100644 --- a/build_util/create_venv_and_generate_licenses.bash +++ b/tools/create_venv_and_generate_licenses.bash @@ -21,7 +21,7 @@ fi pip install -r requirements.txt # requirements-dev.txt でバージョン指定されている pip-licenses をインストールする pip install "$(grep pip-licenses requirements-dev.txt | cut -f 1 -d ';')" -python build_util/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" +python tools/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" deactivate diff --git a/build_util/generate_licenses.py b/tools/generate_licenses.py similarity index 97% rename from build_util/generate_licenses.py rename to tools/generate_licenses.py index f7317e46c..d7d0e9d53 100644 --- a/build_util/generate_licenses.py +++ b/tools/generate_licenses.py @@ -141,21 +141,21 @@ def generate_licenses() -> list[License]: package_name="Open JTalk", package_version="1.11", license_name="Modified BSD license", - license_text="build_util/licenses/open_jtalk/COPYING", + license_text="tools/licenses/open_jtalk/COPYING", license_text_type="local_address", ), License( package_name="MeCab", package_version=None, license_name="Modified BSD license", - license_text="build_util/licenses/open_jtalk/mecab/COPYING", + license_text="tools/licenses/open_jtalk/mecab/COPYING", license_text_type="local_address", ), License( package_name="NAIST Japanese Dictionary", package_version=None, license_name="Modified BSD license", - license_text="build_util/licenses//open_jtalk/mecab-naist-jdic/COPYING", + license_text="tools/licenses//open_jtalk/mecab-naist-jdic/COPYING", license_text_type="local_address", ), License( @@ -257,7 +257,7 @@ def generate_licenses() -> list[License]: package_name="mpg123", package_version="1.30.2", license_name="LGPL-2.1 license", - license_text="build_util/licenses/mpg123/COPYING", + license_text="tools/licenses/mpg123/COPYING", license_text_type="local_address", ), # liblame @@ -277,7 +277,7 @@ def generate_licenses() -> list[License]: package_name="CUDA Toolkit", package_version="11.8.0", license_name=None, - license_text="build_util/licenses/cuda/EULA.txt", + license_text="tools/licenses/cuda/EULA.txt", license_text_type="local_address", ), # license text from cuDNN v8.9.2 (June 1st, 2023), for CUDA 11.x, cuDNN Library for Windows # noqa: B950 @@ -288,7 +288,7 @@ def generate_licenses() -> list[License]: package_name="cuDNN", package_version="8.9.2", license_name=None, - license_text="build_util/licenses/cudnn/LICENSE", + license_text="tools/licenses/cudnn/LICENSE", license_text_type="local_address", ), ] diff --git a/build_util/get_cost_candidates.py b/tools/get_cost_candidates.py similarity index 97% rename from build_util/get_cost_candidates.py rename to tools/get_cost_candidates.py index 15de04175..168854d96 100644 --- a/build_util/get_cost_candidates.py +++ b/tools/get_cost_candidates.py @@ -3,7 +3,7 @@ 引数のnaist_jdic_pathには、open_jtalkのsrc/mecab-naist-jdic/naist-jdic.csvを指定してください。 実行例: -python build_util/get_cost_candidates.py --naist_jdic_path=/path/to/naist-jdic.csv \ +python tools/get_cost_candidates.py --naist_jdic_path=/path/to/naist-jdic.csv \ --pos=名詞 \ --pos_detail_1=固有名詞 \ --pos_detail_2=一般 \ diff --git a/build_util/licenses/cuda/EULA.txt b/tools/licenses/cuda/EULA.txt similarity index 100% rename from build_util/licenses/cuda/EULA.txt rename to tools/licenses/cuda/EULA.txt diff --git a/build_util/licenses/cudnn/LICENSE b/tools/licenses/cudnn/LICENSE similarity index 100% rename from build_util/licenses/cudnn/LICENSE rename to tools/licenses/cudnn/LICENSE diff --git a/build_util/licenses/mpg123/COPYING b/tools/licenses/mpg123/COPYING similarity index 100% rename from build_util/licenses/mpg123/COPYING rename to tools/licenses/mpg123/COPYING diff --git a/build_util/licenses/open_jtalk/COPYING b/tools/licenses/open_jtalk/COPYING similarity index 100% rename from build_util/licenses/open_jtalk/COPYING rename to tools/licenses/open_jtalk/COPYING diff --git a/build_util/licenses/open_jtalk/mecab-naist-jdic/COPYING b/tools/licenses/open_jtalk/mecab-naist-jdic/COPYING similarity index 100% rename from build_util/licenses/open_jtalk/mecab-naist-jdic/COPYING rename to tools/licenses/open_jtalk/mecab-naist-jdic/COPYING diff --git a/build_util/licenses/open_jtalk/mecab/COPYING b/tools/licenses/open_jtalk/mecab/COPYING similarity index 100% rename from build_util/licenses/open_jtalk/mecab/COPYING rename to tools/licenses/open_jtalk/mecab/COPYING diff --git a/build_util/licenses/world/LICENSE.txt b/tools/licenses/world/LICENSE.txt similarity index 100% rename from build_util/licenses/world/LICENSE.txt rename to tools/licenses/world/LICENSE.txt diff --git a/build_util/make_docs.py b/tools/make_docs.py similarity index 100% rename from build_util/make_docs.py rename to tools/make_docs.py diff --git a/build_util/merge_update_infos.py b/tools/merge_update_infos.py similarity index 100% rename from build_util/merge_update_infos.py rename to tools/merge_update_infos.py diff --git a/build_util/modify_pyinstaller.bash b/tools/modify_pyinstaller.bash similarity index 100% rename from build_util/modify_pyinstaller.bash rename to tools/modify_pyinstaller.bash diff --git a/build_util/process_voicevox_resource.bash b/tools/process_voicevox_resource.bash similarity index 96% rename from build_util/process_voicevox_resource.bash rename to tools/process_voicevox_resource.bash index 28572fb83..086557209 100644 --- a/build_util/process_voicevox_resource.bash +++ b/tools/process_voicevox_resource.bash @@ -19,7 +19,7 @@ jq -s '.[0] * .[1]' engine_manifest.json "${DOWNLOAD_RESOURCE_PATH}/engine/engin mv engine_manifest.json.tmp engine_manifest.json # エンジンとリソースの更新情報を統合する -python build_util/merge_update_infos.py \ +python tools/merge_update_infos.py \ resources/engine_manifest_assets/update_infos.json \ "${DOWNLOAD_RESOURCE_PATH}/engine/engine_manifest_assets/update_infos.json" \ resources/engine_manifest_assets/update_infos.json