Skip to content

Commit

Permalink
#549を解決
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Jan 10, 2023
1 parent 3487773 commit 195c91a
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ jobs:
- name: Generate licenses.json
shell: bash
run: |
python generate_licenses.py > engine_manifest_assets/dependency_licenses.json
OUTPUT_LICENSE_JSON_PATH=engine_manifest_assets/dependency_licenses.json \
bash build_util/create_venv_and_generate_licenses.bash
# FIXME: VOICEVOX (editor) cannot build without licenses.json
cp engine_manifest_assets/dependency_licenses.json licenses.json
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,10 @@ poetry update `パッケージ名`
poetry update # 全部更新

# requirements.txtの更新
poetry export --without-hashes -o requirements.txt # こちらを更新する場合は下2つも更新する必要があります
poetry export --without-hashes -o requirements.txt # こちらを更新する場合は下3つも更新する必要があります
poetry export --without-hashes --with dev -o requirements-dev.txt
poetry export --without-hashes --with test -o requirements-test.txt
poetry export --without-hashes --with license -o requirements-license.txt
```

### ライセンス
Expand Down
4 changes: 2 additions & 2 deletions build_util/codesign.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

set -eu

if [ -v "${CERT_BASE64}" ]; then
if [ ! -v CERT_BASE64 ]; then
echo "CERT_BASE64が未定義です"
exit 1
fi
if [ -v "${CERT_PASSWORD}" ]; then
if [ ! -v CERT_PASSWORD ]; then
echo "CERT_PASSWORDが未定義です"
exit 1
fi
Expand Down
20 changes: 20 additions & 0 deletions build_util/create_venv_and_generate_licenses.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 仮想環境を作ってrequirements.txtをインストールし、ライセンス一覧を生成する

set -eux

if [ ! -v OUTPUT_LICENSE_JSON_PATH ]; then
echo "OUTPUT_LICENSE_JSON_PATHが未定義です"
exit 1
fi

VENV_PATH="licenses_venv"

python -m venv $VENV_PATH
source $VENV_PATH/bin/activate

pip install -r requirements-license.txt
python generate_licenses.py >$OUTPUT_LICENSE_JSON_PATH

deactivate

rm -rf $VENV_PATH
2 changes: 1 addition & 1 deletion build_util/process_voicevox_resource.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -eux

if [ -v "${DOWNLOAD_RESOURCE_PATH}" ]; then
if [ ! -v DOWNLOAD_RESOURCE_PATH ]; then
echo "DOWNLOAD_RESOURCE_PATHが未定義です"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ pyopenjtalk = {git = "https://github.com/VOICEVOX/pyopenjtalk", rev = "f4ade29ef
[tool.poetry.group.dev.dependencies]
cython = "^0.29.24"
pyinstaller = "^5.3"
pip-licenses = "^3.5.3"
pre-commit = "^2.16.0"
atomicwrites = "^1.4.0"
colorama = "^0.4.4"
Expand All @@ -67,6 +66,12 @@ pysen = {version = "~0", extras = ["lint"]}
pytest = "^6.2.5"
coveralls = "^3.2.0"

[tool.poetry.group.license]
optional = true

[tool.poetry.group.license.dependencies]
pip-licenses = "^3.5.3"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
2 changes: 0 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ numpy==1.20.0 ; python_version >= "3.8" and python_version < "3.9"
packaging==22.0 ; python_version >= "3.8" and python_version < "3.9"
pefile==2022.5.30 ; python_version >= "3.8" and python_version < "3.9" and sys_platform == "win32"
pexpect==4.8.0 ; python_version >= "3.8" and python_version < "3.9"
pip-licenses==3.5.5 ; python_version >= "3.8" and python_version < "3.9"
pkginfo==1.9.4 ; python_version >= "3.8" and python_version < "3.9"
pkgutil-resolve-name==1.3.10 ; python_version >= "3.8" and python_version < "3.9"
platformdirs==2.6.2 ; python_version >= "3.8" and python_version < "3.9"
poetry-core==1.4.0 ; python_version >= "3.8" and python_version < "3.9"
poetry-plugin-export==1.2.0 ; python_version >= "3.8" and python_version < "3.9"
poetry==1.3.1 ; python_version >= "3.8" and python_version < "3.9"
pre-commit==2.16.0 ; python_version >= "3.8" and python_version < "3.9"
ptable==0.9.2 ; python_version >= "3.8" and python_version < "3.9"
ptyprocess==0.7.0 ; python_version >= "3.8" and python_version < "3.9"
pycparser==2.21 ; python_version >= "3.8" and python_version < "3.9"
pydantic==1.10.2 ; python_version >= "3.8" and python_version < "3.9"
Expand Down
34 changes: 34 additions & 0 deletions requirements-license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
aiofiles==0.7.0 ; python_version >= "3.8" and python_version < "3.9"
anyio==3.6.2 ; python_version >= "3.8" and python_version < "3.9"
appdirs==1.4.4 ; python_version >= "3.8" and python_version < "3.9"
asgiref==3.6.0 ; python_version >= "3.8" and python_version < "3.9"
certifi==2022.12.7 ; python_version >= "3.8" and python_version < "3.9"
cffi==1.15.1 ; python_version >= "3.8" and python_version < "3.9"
charset-normalizer==2.1.1 ; python_version >= "3.8" and python_version < "3.9"
click==8.0.4 ; python_version >= "3.8" and python_version < "3.9"
colorama==0.4.4 ; python_version >= "3.8" and python_version < "3.9" and platform_system == "Windows"
cython==0.29.24 ; python_version >= "3.8" and python_version < "3.9"
fastapi==0.70.0 ; python_version >= "3.8" and python_version < "3.9"
h11==0.14.0 ; python_version >= "3.8" and python_version < "3.9"
idna==3.4 ; python_version >= "3.8" and python_version < "3.9"
jinja2==3.1.2 ; python_version >= "3.8" and python_version < "3.9"
markupsafe==2.1.1 ; python_version >= "3.8" and python_version < "3.9"
numpy==1.20.0 ; python_version >= "3.8" and python_version < "3.9"
pip-licenses==3.5.5 ; python_version >= "3.8" and python_version < "3.9"
ptable==0.9.2 ; python_version >= "3.8" and python_version < "3.9"
pycparser==2.21 ; python_version >= "3.8" and python_version < "3.9"
pydantic==1.10.2 ; python_version >= "3.8" and python_version < "3.9"
pyopenjtalk @ git+https://github.com/VOICEVOX/pyopenjtalk@f4ade29ef9a4f43d8605103cb5bacc29e0b2ccae ; python_version >= "3.8" and python_version < "3.9"
python-multipart==0.0.5 ; python_version >= "3.8" and python_version < "3.9"
pyworld==0.3.0 ; python_version >= "3.8" and python_version < "3.9"
pyyaml==6.0 ; python_version >= "3.8" and python_version < "3.9"
requests==2.28.1 ; python_version >= "3.8" and python_version < "3.9"
scipy==1.7.1 ; python_version >= "3.8" and python_version < "3.9"
six==1.16.0 ; python_version >= "3.8" and python_version < "3.9"
sniffio==1.3.0 ; python_version >= "3.8" and python_version < "3.9"
soundfile==0.10.3.post1 ; python_version >= "3.8" and python_version < "3.9"
starlette==0.16.0 ; python_version >= "3.8" and python_version < "3.9"
tqdm==4.64.1 ; python_version >= "3.8" and python_version < "3.9"
typing-extensions==4.4.0 ; python_version >= "3.8" and python_version < "3.9"
urllib3==1.26.13 ; python_version >= "3.8" and python_version < "3.9"
uvicorn==0.15.0 ; python_version >= "3.8" and python_version < "3.9"

0 comments on commit 195c91a

Please sign in to comment.