-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
29 lines (25 loc) · 787 Bytes
/
Copy pathsetup.py
File metadata and controls
29 lines (25 loc) · 787 Bytes
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
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import pathlib
import setuptools
import cmake_build_extension
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="waifu2x-ncnn-vulkan-python",
install_prefix="waifu2x_ncnn_vulkan_python",
write_top_level_init="from .waifu2x_ncnn_vulkan import Waifu2x",
source_dir=str(
pathlib.Path(__file__).parent / "waifu2x_ncnn_vulkan_python"
),
cmake_configure_options=cmake_flags,
)
],
cmdclass={"build_ext": cmake_build_extension.BuildExtension},
)