Skip to content
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

BLD: ビルド時に使用するcythonバージョンを制限する #18

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

sabonerune
Copy link

内容

Cython3.0がリリースされたことによってpyopenjtalkのビルドが失敗するようになりました。
一時的な対策としてビルドに使用するバージョンを制限します。

関連 Issue

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! 元の課題が解決されたらバージョン範囲指定解放したいですね!

pyproject.toml Outdated Show resolved Hide resolved
@Hiroshiba Hiroshiba merged commit acd4f02 into VOICEVOX:master Jul 18, 2023
@Hiroshiba
Copy link
Member

VOICEVOX ENGINE側で
poetry add git+https://github.com/VOICEVOX/pyopenjtalk@acd4f02d2af3129382c151590238b9370465e360
したところ、cythonのバージョンは">=0.21.0"で入ってそうでした 😇

diff --git a/poetry.lock b/poetry.lock
index 9cfd457..35e850f 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1635,8 +1635,8 @@ files = [
 
 [[package]]
 name = "pyopenjtalk"
-version = "0.3.0"
-description = ""
+version = "0.3.0+acd4f02"
+description = "A python wrapper for OpenJTalk"
 category = "main"
 optional = false
 python-versions = "*"
@@ -1644,6 +1644,7 @@ files = []
 develop = false
 
 [package.dependencies]
+cython = ">=0.21.0"
 numpy = ">=1.20.0"
 six = "*"
 tqdm = "*"
@@ -1657,8 +1658,8 @@ test = ["pytest", "scipy"]
 [package.source]
 type = "git"
 url = "https://github.com/VOICEVOX/pyopenjtalk"
-reference = "827a3fc5c7dda7bbe832c0c69da98e39cc8cb2c3"
-resolved_reference = "827a3fc5c7dda7bbe832c0c69da98e39cc8cb2c3"
+reference = "acd4f02d2af3129382c151590238b9370465e360"
+resolved_reference = "acd4f02d2af3129382c151590238b9370465e360"
 
 [[package]]
 name = "pyrsistent"
@@ -2423,4 +2424,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
 [metadata]
 lock-version = "2.0"
 python-versions = "~3.11"
-content-hash = "bee5ebb211d4814a813a618a1325354c79d66b94bf799c8077339738d567e11f"
+content-hash = "04c3ef7fe6818c50549c98a20666cb79f61b895e9eb6ae8910aa8c39b6d74e03"

これは setup.py の方に書かれている内容かもです。

min_cython_ver = "0.21.0"

なんで二重管理されてるんだろう & poetryで入るのはどっちなんだろう・・・。

@Hiroshiba
Copy link
Member

あ、、無知でした。。
pyproject.tomlの[build-system]のrequiresに書かれているのはビルドに必要なものなんですね。。
ChatGPT君 https://chat.openai.com/share/08720d55-11d8-4274-94f4-5d35e3340614

@sabonerune
Copy link
Author

本来は実行時にCythonを使用しないためinstall_requires側のCythonは不要のはずなんですよね…
(開発時には必要なのでextras_requireの方に入れる)

@sabonerune sabonerune deleted the bld/cython3-workaround branch July 18, 2023 12:37
@Hiroshiba
Copy link
Member

なるほど~~~~。本家の方になぜ入れているのかとか聞いてみてもいいかもですね!
とりあえずすごくよくわかりました!ありがとうございます!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants