-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
49 lines (43 loc) · 1.37 KB
/
setup.py
File metadata and controls
49 lines (43 loc) · 1.37 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from setuptools import setup
from pybind11.setup_helpers import Pybind11Extension
from uiucprescon.build.pybind11_builder import BuildPybind11Extension
PACKAGE_NAME = "uiucprescon.imagevalidate"
class BuildPybind11Extensions(BuildPybind11Extension):
def run(self):
conan_cmd = self.get_finalized_command("build_conan")
conan_cmd.run()
super().run()
def build_extension(self, ext: Pybind11Extension):
build_conan = self.get_finalized_command("build_conan")
build_conan.build_libs = ['missing']
build_conan.run()
super().build_extension(ext)
open_jpeg_extension = Pybind11Extension(
"uiucprescon.imagevalidate.openjp2wrap",
sources=[
"src/uiucprescon/imagevalidate/glue.cpp",
"src/uiucprescon/imagevalidate/openjp2wrap.cpp",
"src/uiucprescon/imagevalidate/opj_colorspace_checker.cpp"
],
language="c++",
libraries=["openjp2"],
)
openjpeg_library = \
("openjp2",
{
"url": "https://github.com/uclouvain/openjpeg/archive/v2.3.1.tar.gz",
"cmake_args": [
("-DBUILD_CODEC:BOOL", "OFF"),
("-DBUILD_SHARED_LIBS:BOOL", "ON"),
],
"sources": [],
"expected_headers": ["openjpeg.h"]
}
)
setup(
ext_modules=[open_jpeg_extension],
libraries=[],
cmdclass={
"build_ext": BuildPybind11Extensions
}
)