Skip to content

Commit

Permalink
特定の環境だけ pyi ファイルを生成する
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Jun 10, 2024
1 parent e0b9cfa commit 6053be0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,6 @@ endif()
target_link_libraries(sora_sdk_ext PRIVATE Sora::sora)

install(TARGETS sora_sdk_ext LIBRARY DESTINATION .)
install(FILES py.typed sora_sdk_ext.pyi DESTINATION ".")
if (SORA_GEN_PYI)
install(FILES py.typed sora_sdk_ext.pyi DESTINATION ".")
endif()
4 changes: 4 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,10 @@ def main():
"-DNB_SUFFIX=.cpython-38-aarch64-linux-gnu.so",
]

# Windows 以外の、クロスコンパイルでない環境では pyi ファイルを生成する
if target_platform.os != "windows" and build_platform.package_name == target_platform.package_name:
cmake_args.append("-DSORA_GEN_PYI=ON")

sora_src_dir = os.path.join("src", "sora_sdk")
sora_build_dir = os.path.join(build_dir, "sora_sdk")
if target_platform.os == "windows":
Expand Down

0 comments on commit 6053be0

Please sign in to comment.