-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
30 lines (27 loc) · 848 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import pathlib
import cmake_build_extension
import setuptools
cmake_flags = [
"-DBUILD_SHARED_LIBS:BOOL=OFF",
"-DCALL_FROM_SETUP_PY:BOOL=ON",
]
cmake_flags.extend(os.environ.get("CMAKE_FLAGS", "").split())
setuptools.setup(
ext_modules=[
cmake_build_extension.CMakeExtension(
name="realcugan-ncnn-vulkan-python",
install_prefix="realcugan_ncnn_vulkan_python",
write_top_level_init=(
"from .realcugan_ncnn_vulkan import Realcugan, RealCUGAN, wrapped"
),
source_dir=str(
pathlib.Path(__file__).parent / "realcugan_ncnn_vulkan_python"
),
cmake_configure_options=cmake_flags,
)
],
cmdclass={"build_ext": cmake_build_extension.BuildExtension},
)