From 9649aace30f5b5c7438ca69f073a3a07d459c9c2 Mon Sep 17 00:00:00 2001 From: tarepan Date: Mon, 3 Jun 2024 08:14:53 +0000 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20`build=5Futil`=20=E2=86=92=20`s?= =?UTF-8?q?cripts`=20=E3=81=B8=E3=83=AA=E3=83=8D=E3=83=BC=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docs.yml | 2 +- .github/workflows/build-engine-container.yml | 2 +- .github/workflows/build-engine-package.yml | 8 ++++---- .github/workflows/test-engine-container.yml | 2 +- .github/workflows/test-engine-package.yml | 2 +- .github/workflows/test.yml | 2 +- CONTRIBUTING.md | 4 ++-- Dockerfile | 6 +++--- README.md | 4 ++-- {build_util => scripts}/check_release_build.py | 0 {build_util => scripts}/codesign.bash | 0 .../create_venv_and_generate_licenses.bash | 2 +- {build_util => scripts}/generate_licenses.py | 12 ++++++------ {build_util => scripts}/get_cost_candidates.py | 2 +- {build_util => scripts}/licenses/cuda/EULA.txt | 0 {build_util => scripts}/licenses/cudnn/LICENSE | 0 {build_util => scripts}/licenses/mpg123/COPYING | 0 {build_util => scripts}/licenses/open_jtalk/COPYING | 0 .../licenses/open_jtalk/mecab-naist-jdic/COPYING | 0 .../licenses/open_jtalk/mecab/COPYING | 0 {build_util => scripts}/licenses/world/LICENSE.txt | 0 {build_util => scripts}/make_docs.py | 0 {build_util => scripts}/merge_update_infos.py | 0 {build_util => scripts}/modify_pyinstaller.bash | 0 .../process_voicevox_resource.bash | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) rename {build_util => scripts}/check_release_build.py (100%) rename {build_util => scripts}/codesign.bash (100%) rename {build_util => scripts}/create_venv_and_generate_licenses.bash (88%) rename {build_util => scripts}/generate_licenses.py (97%) rename {build_util => scripts}/get_cost_candidates.py (97%) rename {build_util => scripts}/licenses/cuda/EULA.txt (100%) rename {build_util => scripts}/licenses/cudnn/LICENSE (100%) rename {build_util => scripts}/licenses/mpg123/COPYING (100%) rename {build_util => scripts}/licenses/open_jtalk/COPYING (100%) rename {build_util => scripts}/licenses/open_jtalk/mecab-naist-jdic/COPYING (100%) rename {build_util => scripts}/licenses/open_jtalk/mecab/COPYING (100%) rename {build_util => scripts}/licenses/world/LICENSE.txt (100%) rename {build_util => scripts}/make_docs.py (100%) rename {build_util => scripts}/merge_update_infos.py (100%) rename {build_util => scripts}/modify_pyinstaller.bash (100%) rename {build_util => scripts}/process_voicevox_resource.bash (96%) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 90baa9a6b..276fddbd0 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 scripts/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..f25a530bf 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 scripts/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..3db34e518 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: ./scripts/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 scripts/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 scripts/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 scripts/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..301cd52bb 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 scripts/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..7f09f1ab0 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 scripts/check_release_build.py --dist_dir dist/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ca16ca64..e1e5ed0a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,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 scripts/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 09ffb1e92..66a5e9469 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -306,7 +306,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 scripts/create_venv_and_generate_licenses.bash # モックでビルドする場合 pyinstaller --noconfirm run.spec @@ -329,7 +329,7 @@ fork したリポジトリで Actions を ON にし、workflow_dispatch で`buil 次のコマンドで API ドキュメントを手動で作成することができます。 ```bash -PYTHONPATH=. python build_util/make_docs.py +PYTHONPATH=. python scripts/make_docs.py ``` ## GitHub Actions diff --git a/Dockerfile b/Dockerfile index 6fcb21d00..465537c71 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 ./scripts/generate_licenses.py /opt/voicevox_engine/scripts/ +ADD ./scripts/licenses /opt/voicevox_engine/scripts/licenses # Replace version ARG VOICEVOX_ENGINE_VERSION=latest @@ -251,7 +251,7 @@ RUN < /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json + gosu user /opt/python/bin/python3 scripts/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 a0a96c6d5..4c56191f1 100644 --- a/README.md +++ b/README.md @@ -572,7 +572,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 scripts/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 scripts/make_docs.py ``` ### GitHub Actions diff --git a/build_util/check_release_build.py b/scripts/check_release_build.py similarity index 100% rename from build_util/check_release_build.py rename to scripts/check_release_build.py diff --git a/build_util/codesign.bash b/scripts/codesign.bash similarity index 100% rename from build_util/codesign.bash rename to scripts/codesign.bash diff --git a/build_util/create_venv_and_generate_licenses.bash b/scripts/create_venv_and_generate_licenses.bash similarity index 88% rename from build_util/create_venv_and_generate_licenses.bash rename to scripts/create_venv_and_generate_licenses.bash index 58af05e29..cfd28768e 100644 --- a/build_util/create_venv_and_generate_licenses.bash +++ b/scripts/create_venv_and_generate_licenses.bash @@ -19,7 +19,7 @@ else fi pip install -r requirements-license.txt -python build_util/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" +python scripts/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" deactivate diff --git a/build_util/generate_licenses.py b/scripts/generate_licenses.py similarity index 97% rename from build_util/generate_licenses.py rename to scripts/generate_licenses.py index f7317e46c..5f9395980 100644 --- a/build_util/generate_licenses.py +++ b/scripts/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="scripts/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="scripts/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="scripts/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="scripts/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="scripts/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="scripts/licenses/cudnn/LICENSE", license_text_type="local_address", ), ] diff --git a/build_util/get_cost_candidates.py b/scripts/get_cost_candidates.py similarity index 97% rename from build_util/get_cost_candidates.py rename to scripts/get_cost_candidates.py index 15de04175..a3ce1e9e1 100644 --- a/build_util/get_cost_candidates.py +++ b/scripts/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 scripts/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/scripts/licenses/cuda/EULA.txt similarity index 100% rename from build_util/licenses/cuda/EULA.txt rename to scripts/licenses/cuda/EULA.txt diff --git a/build_util/licenses/cudnn/LICENSE b/scripts/licenses/cudnn/LICENSE similarity index 100% rename from build_util/licenses/cudnn/LICENSE rename to scripts/licenses/cudnn/LICENSE diff --git a/build_util/licenses/mpg123/COPYING b/scripts/licenses/mpg123/COPYING similarity index 100% rename from build_util/licenses/mpg123/COPYING rename to scripts/licenses/mpg123/COPYING diff --git a/build_util/licenses/open_jtalk/COPYING b/scripts/licenses/open_jtalk/COPYING similarity index 100% rename from build_util/licenses/open_jtalk/COPYING rename to scripts/licenses/open_jtalk/COPYING diff --git a/build_util/licenses/open_jtalk/mecab-naist-jdic/COPYING b/scripts/licenses/open_jtalk/mecab-naist-jdic/COPYING similarity index 100% rename from build_util/licenses/open_jtalk/mecab-naist-jdic/COPYING rename to scripts/licenses/open_jtalk/mecab-naist-jdic/COPYING diff --git a/build_util/licenses/open_jtalk/mecab/COPYING b/scripts/licenses/open_jtalk/mecab/COPYING similarity index 100% rename from build_util/licenses/open_jtalk/mecab/COPYING rename to scripts/licenses/open_jtalk/mecab/COPYING diff --git a/build_util/licenses/world/LICENSE.txt b/scripts/licenses/world/LICENSE.txt similarity index 100% rename from build_util/licenses/world/LICENSE.txt rename to scripts/licenses/world/LICENSE.txt diff --git a/build_util/make_docs.py b/scripts/make_docs.py similarity index 100% rename from build_util/make_docs.py rename to scripts/make_docs.py diff --git a/build_util/merge_update_infos.py b/scripts/merge_update_infos.py similarity index 100% rename from build_util/merge_update_infos.py rename to scripts/merge_update_infos.py diff --git a/build_util/modify_pyinstaller.bash b/scripts/modify_pyinstaller.bash similarity index 100% rename from build_util/modify_pyinstaller.bash rename to scripts/modify_pyinstaller.bash diff --git a/build_util/process_voicevox_resource.bash b/scripts/process_voicevox_resource.bash similarity index 96% rename from build_util/process_voicevox_resource.bash rename to scripts/process_voicevox_resource.bash index 28572fb83..25e304eca 100644 --- a/build_util/process_voicevox_resource.bash +++ b/scripts/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 scripts/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 From d602a64427b8eba3f1a5904fe9212b0a8bc600aa Mon Sep 17 00:00:00 2001 From: tarepan Date: Mon, 17 Jun 2024 14:09:41 +0000 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20`scripts`=20=E2=86=92=20`tools`?= =?UTF-8?q?=20=E3=81=AB=E3=83=AA=E3=83=8D=E3=83=BC=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docs.yml | 2 +- .github/workflows/build-engine-container.yml | 2 +- .github/workflows/build-engine-package.yml | 8 ++++---- .github/workflows/test-engine-container.yml | 2 +- .github/workflows/test-engine-package.yml | 2 +- .github/workflows/test.yml | 2 +- CONTRIBUTING.md | 4 ++-- Dockerfile | 6 +++--- README.md | 4 ++-- scripts/create_venv_and_generate_licenses.bash | 2 +- scripts/generate_licenses.py | 12 ++++++------ scripts/get_cost_candidates.py | 2 +- scripts/process_voicevox_resource.bash | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 276fddbd0..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 scripts/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 f25a530bf..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 scripts/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 3db34e518..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: ./scripts/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 scripts/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 scripts/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 scripts/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 301cd52bb..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 scripts/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 7f09f1ab0..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 scripts/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 5923906c1..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 scripts/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 7935673ea..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 scripts/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 scripts/make_docs.py +PYTHONPATH=. python tools/make_docs.py ``` ## GitHub Actions diff --git a/Dockerfile b/Dockerfile index 181d53562..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 ./scripts/generate_licenses.py /opt/voicevox_engine/scripts/ -ADD ./scripts/licenses /opt/voicevox_engine/scripts/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 cc3997f94..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 scripts/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 scripts/make_docs.py +PYTHONPATH=. python tools/make_docs.py ``` ### GitHub Actions diff --git a/scripts/create_venv_and_generate_licenses.bash b/scripts/create_venv_and_generate_licenses.bash index b1421b512..09d9154d8 100644 --- a/scripts/create_venv_and_generate_licenses.bash +++ b/scripts/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 scripts/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" +python tools/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" deactivate diff --git a/scripts/generate_licenses.py b/scripts/generate_licenses.py index 5f9395980..d7d0e9d53 100644 --- a/scripts/generate_licenses.py +++ b/scripts/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="scripts/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="scripts/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="scripts/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="scripts/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="scripts/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="scripts/licenses/cudnn/LICENSE", + license_text="tools/licenses/cudnn/LICENSE", license_text_type="local_address", ), ] diff --git a/scripts/get_cost_candidates.py b/scripts/get_cost_candidates.py index a3ce1e9e1..168854d96 100644 --- a/scripts/get_cost_candidates.py +++ b/scripts/get_cost_candidates.py @@ -3,7 +3,7 @@ 引数のnaist_jdic_pathには、open_jtalkのsrc/mecab-naist-jdic/naist-jdic.csvを指定してください。 実行例: -python scripts/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/scripts/process_voicevox_resource.bash b/scripts/process_voicevox_resource.bash index 25e304eca..086557209 100644 --- a/scripts/process_voicevox_resource.bash +++ b/scripts/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 scripts/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 From 943d6b65fbaa05927097cadd5830c3766096abd5 Mon Sep 17 00:00:00 2001 From: tarepan Date: Mon, 17 Jun 2024 14:12:23 +0000 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20=E3=83=87=E3=82=A3=E3=83=AC?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=83=AA=E3=82=92=20`scripts`=20=E2=86=92=20?= =?UTF-8?q?`tools`=20=E3=81=B8=E3=83=AA=E3=83=8D=E3=83=BC=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {scripts => tools}/check_release_build.py | 0 {scripts => tools}/codesign.bash | 0 {scripts => tools}/create_venv_and_generate_licenses.bash | 0 {scripts => tools}/generate_licenses.py | 0 {scripts => tools}/get_cost_candidates.py | 0 {scripts => tools}/licenses/cuda/EULA.txt | 0 {scripts => tools}/licenses/cudnn/LICENSE | 0 {scripts => tools}/licenses/mpg123/COPYING | 0 {scripts => tools}/licenses/open_jtalk/COPYING | 0 {scripts => tools}/licenses/open_jtalk/mecab-naist-jdic/COPYING | 0 {scripts => tools}/licenses/open_jtalk/mecab/COPYING | 0 {scripts => tools}/licenses/world/LICENSE.txt | 0 {scripts => tools}/make_docs.py | 0 {scripts => tools}/merge_update_infos.py | 0 {scripts => tools}/modify_pyinstaller.bash | 0 {scripts => tools}/process_voicevox_resource.bash | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename {scripts => tools}/check_release_build.py (100%) rename {scripts => tools}/codesign.bash (100%) rename {scripts => tools}/create_venv_and_generate_licenses.bash (100%) rename {scripts => tools}/generate_licenses.py (100%) rename {scripts => tools}/get_cost_candidates.py (100%) rename {scripts => tools}/licenses/cuda/EULA.txt (100%) rename {scripts => tools}/licenses/cudnn/LICENSE (100%) rename {scripts => tools}/licenses/mpg123/COPYING (100%) rename {scripts => tools}/licenses/open_jtalk/COPYING (100%) rename {scripts => tools}/licenses/open_jtalk/mecab-naist-jdic/COPYING (100%) rename {scripts => tools}/licenses/open_jtalk/mecab/COPYING (100%) rename {scripts => tools}/licenses/world/LICENSE.txt (100%) rename {scripts => tools}/make_docs.py (100%) rename {scripts => tools}/merge_update_infos.py (100%) rename {scripts => tools}/modify_pyinstaller.bash (100%) rename {scripts => tools}/process_voicevox_resource.bash (100%) diff --git a/scripts/check_release_build.py b/tools/check_release_build.py similarity index 100% rename from scripts/check_release_build.py rename to tools/check_release_build.py diff --git a/scripts/codesign.bash b/tools/codesign.bash similarity index 100% rename from scripts/codesign.bash rename to tools/codesign.bash diff --git a/scripts/create_venv_and_generate_licenses.bash b/tools/create_venv_and_generate_licenses.bash similarity index 100% rename from scripts/create_venv_and_generate_licenses.bash rename to tools/create_venv_and_generate_licenses.bash diff --git a/scripts/generate_licenses.py b/tools/generate_licenses.py similarity index 100% rename from scripts/generate_licenses.py rename to tools/generate_licenses.py diff --git a/scripts/get_cost_candidates.py b/tools/get_cost_candidates.py similarity index 100% rename from scripts/get_cost_candidates.py rename to tools/get_cost_candidates.py diff --git a/scripts/licenses/cuda/EULA.txt b/tools/licenses/cuda/EULA.txt similarity index 100% rename from scripts/licenses/cuda/EULA.txt rename to tools/licenses/cuda/EULA.txt diff --git a/scripts/licenses/cudnn/LICENSE b/tools/licenses/cudnn/LICENSE similarity index 100% rename from scripts/licenses/cudnn/LICENSE rename to tools/licenses/cudnn/LICENSE diff --git a/scripts/licenses/mpg123/COPYING b/tools/licenses/mpg123/COPYING similarity index 100% rename from scripts/licenses/mpg123/COPYING rename to tools/licenses/mpg123/COPYING diff --git a/scripts/licenses/open_jtalk/COPYING b/tools/licenses/open_jtalk/COPYING similarity index 100% rename from scripts/licenses/open_jtalk/COPYING rename to tools/licenses/open_jtalk/COPYING diff --git a/scripts/licenses/open_jtalk/mecab-naist-jdic/COPYING b/tools/licenses/open_jtalk/mecab-naist-jdic/COPYING similarity index 100% rename from scripts/licenses/open_jtalk/mecab-naist-jdic/COPYING rename to tools/licenses/open_jtalk/mecab-naist-jdic/COPYING diff --git a/scripts/licenses/open_jtalk/mecab/COPYING b/tools/licenses/open_jtalk/mecab/COPYING similarity index 100% rename from scripts/licenses/open_jtalk/mecab/COPYING rename to tools/licenses/open_jtalk/mecab/COPYING diff --git a/scripts/licenses/world/LICENSE.txt b/tools/licenses/world/LICENSE.txt similarity index 100% rename from scripts/licenses/world/LICENSE.txt rename to tools/licenses/world/LICENSE.txt diff --git a/scripts/make_docs.py b/tools/make_docs.py similarity index 100% rename from scripts/make_docs.py rename to tools/make_docs.py diff --git a/scripts/merge_update_infos.py b/tools/merge_update_infos.py similarity index 100% rename from scripts/merge_update_infos.py rename to tools/merge_update_infos.py diff --git a/scripts/modify_pyinstaller.bash b/tools/modify_pyinstaller.bash similarity index 100% rename from scripts/modify_pyinstaller.bash rename to tools/modify_pyinstaller.bash diff --git a/scripts/process_voicevox_resource.bash b/tools/process_voicevox_resource.bash similarity index 100% rename from scripts/process_voicevox_resource.bash rename to tools/process_voicevox_resource.bash