-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
53 lines (48 loc) · 1.36 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import sys
import setuptools
class get_pybind_include(object):
def __str__(self):
import pybind11
print('get_pybind_include', pybind11.get_include())
return pybind11.get_include()
class get_pybind_user_include(object):
def __str__(self):
import pybind11
print('get_pybind_user_include', pybind11.get_include(True))
return pybind11.get_include(True)
if sys.platform == 'win32':
compile_args = [
'/bigobj',
'/DImTextureID=int',
'/DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1',
]
else:
compile_args = [
'-std=c++14',
'-Wno-error',
'-Wno-null-conversion',
'-DImTextureID=int',
'-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1',
]
module = setuptools.Extension("deargui", [
'imgui/imgui.cpp',
'imgui/imgui_demo.cpp',
'imgui/imgui_draw.cpp',
'imgui/imgui_widgets.cpp',
'deargui/deargui.cpp',
],
include_dirs = [get_pybind_include(), get_pybind_user_include(), 'imgui'],
extra_compile_args = compile_args,
language = 'c++',
)
setuptools.setup(
name = 'deargui',
description = 'Python bindings for Dear ImGui',
version = '0.1.5',
url = 'http://github.com/cammm/deargui',
license = 'MIT',
author = 'cammm',
packages = setuptools.find_packages(),
ext_modules = [module],
setup_requires = ['pybind11'],
)