Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin62628 authored Mar 7, 2022
1 parent 5f057f9 commit c05d2e7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def download_models() -> None:
# remove the temporary files/dirs
rife_ncnn_vulkan_zip.unlink()

cmake_flags = [
"-DBUILD_SHARED_LIBS:BOOL=OFF",
"-DCALL_FROM_SETUP_PY:BOOL=ON",
]
cmake_flags.extend(os.environ.get("CMAKE_FLAGS", "").split())

# when building bdist wheels/installing the package
if sys.argv[1] == "bdist_wheel":
Expand All @@ -97,10 +102,7 @@ def download_models() -> None:
install_prefix="rife_ncnn_vulkan_python",
write_top_level_init="from .rife_ncnn_vulkan import Rife, RIFE, wrapped",
source_dir=str(pathlib.Path(__file__).parent / "rife_ncnn_vulkan_python"),
cmake_configure_options=[
"-DBUILD_SHARED_LIBS:BOOL=OFF",
"-DCALL_FROM_SETUP_PY:BOOL=ON",
],
cmake_configure_options=cmake_flags,
)
],
cmdclass={"build_ext": cmake_build_extension.BuildExtension},
Expand Down

0 comments on commit c05d2e7

Please sign in to comment.