-
Notifications
You must be signed in to change notification settings - Fork 248
WindowsビルドをPyInstallerへ移行 #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
y-chan
merged 1 commit into
VOICEVOX:pyinstaller
from
y-chan:feature/pyinstaller-windows
Aug 7, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| -r requirements.in | ||
| cython | ||
| nuitka | ||
| pyinstaller | ||
| pip-licenses | ||
| pip-tools | ||
| pre-commit | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(pyinstaller を使っていたことがあるのですが、だいぶ以前なので記憶が錆び付いています……。間違った情報を提供していたらすみません)
こちらのオプションは spec ファイルにまとめると、CI だけでなく手元でビルドする時も便利だと思いました(spec ファイルについては https://pyinstaller.org/en/stable/spec-files.html を参照)。spec ファイルは実際には Pythonのソースファイルなので、OS ごとに設定を記述するということもできる気がします。また、もしかしたら全てのオプションを spec ファイルに書けないかもしれないですが、その場合でも pyinstaller コマンド実行時に追加のオプションを指定できたと思います。
ここのオプションが問題ないかどうかはまだ確認できていないです。何かわかったらまたコメントしたいと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specを記述すると、手元でビルドする際に、各人にspecを書き換えてもらう必要が出るなと思ったので、オプションにしました。
specの方が利便性が高いとは思うのですが、実際どうなんでしょうか...
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
複雑な動的処理がある場合はspecファイルのほうが便利かもです。
現状はファイル指定だけなのでどちらでも良いかなと感じました。
どちらかというと、actionsの特性上specファイルとbuild.ymlのファイルパスが非常に離れるので、一箇所に書ける今のほうが見通しが良いかもしれません。
とりあえずwin版だけの今はこの状態にしておいて、mac版やlinux版を作ったり、より複雑な操作が必要になったときに再考するのはどうでしょう。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specファイルを使えば、必要のないディレクトリ・ファイルの削除などが一括で出来るのですが、
download/onnxruntime/lib/onnxruntime.dll;などのオプションはOSごとに変わってくるため、OSごとにspecファイルを書かなければならず、面倒であるので今回はパスしました。まあ、こういった動作は別に
cpコマンドに分けるようにしてしまってもいいかもしれません。一旦はこのままにして、後で考え直すようにしようかなと思います
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specファイル(pythonファイル)の中でOSで判定してロジックを切り替える、という手もあると思います。
・・・が、ダウンロードしたdllのパスの切り替えは、spec内ではなくactions内でやったほうが絶対良さそう。。
一旦このまま、賛成です!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spec ファイルの件、了解いたしました! CI を書く上での利便性やわかりやすさ等は確かに spec ファイルではなく明示的なオプション指定の方がよさそうですね(そこまでオプションの数も多くないので)。いったんこのままということで納得しました……!