-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
53 lines (53 loc) · 1.99 KB
/
binding.gyp
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
{
"targets": [
{
"target_name": "pyjs-native",
"sources": [
"src/pyjs.cc",
"src/jsobject.cc",
"src/typeconv.cc",
"src/gil-lock.cc",
"src/pyjsfunction.cc",
"src/pymodule.cc",
"src/error.cc"
],
"include_dirs": [
"<!(node -e \"require('nan')\")"
],
"conditions": [
["OS=='win'", {
"libraries": [ "<!(python -c \"from distutils import sysconfig; print(sysconfig.get_config_var('prefix')+'\\\\\\\\libs\\\\\\\\python'+sysconfig.get_config_var('VERSION')+'.lib');\")" ],
"include_dirs": [ "<!(python -c \"from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'));\")" ]
}],
["OS=='mac'", {
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS": [
"<!(python3-config --includes)",
"-std=c++14",
"-stdlib=libc++"
],
"OTHER_LDFLAGS": [
"<!(python3-config --ldflags)",
"-stdlib=libc++"
]
}
}],
["OS=='linux'", {
"cflags": [
"<!(python3-config --cflags | sed 's/-Wstrict-prototypes//')",
"-Waddress",
"-Wconversion"
],
"ldflags": [
"-Wl,--no-as-needed",
"<!(python3-config --ldflags)"
],
"defines": [
"LINUX",
"PYTHON_LIB=\"<!(python3-config --libs | sed 's/-l\\(python\\S*\\).*/lib\\1.so/')\""
]
}]
]
}
]
}