FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node-iptrie/wscript at master · postwait/node-iptrie · GitHub
postwait
/
node-iptrie
Public
Notifications
You must be signed in to change notification settings
Fork
22
Star
55
Code
Issues
6
Pull requests
3
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node-iptrie
/
wscript
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (26 loc) · 950 Bytes
Breadcrumbs
node-iptrie
/
wscript
Copy path
File metadata and controls
35 lines (26 loc) · 950 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
os
srcdir
=
os
.
path
.
abspath
(
'.'
)
blddir
=
'build'
target
=
'iptrie'
VERSION
=
'0.0.1'
def
set_options
(
opt
):
opt
.
tool_options
(
'compiler_cxx'
)
def
configure
(
conf
):
conf
.
check_tool
(
'compiler_cxx'
)
conf
.
check_tool
(
'node_addon'
)
def
build
(
context
,
target
=
target
):
obj
=
context
.
new_task_gen
(
'cxx'
,
'shlib'
,
'node_addon'
)
obj
.
source
=
[
'src/iptrie.cc'
,
'src/btrie.C'
]
obj
.
target
=
target
context
.
add_post_fun
(
move_addon
)
def
move_addon
(
context
,
target
=
target
):
"""Move the compiled addon to the local lib directory. Previously compiled
versions of the addon are overwritten.
"""
filename
=
'%s.node'
%
target
from_path
=
os
.
path
.
join
(
srcdir
,
blddir
,
'default'
,
filename
)
to_path
=
os
.
path
.
join
(
srcdir
,
'lib'
,
filename
)
if
not
os
.
fs
.
exists
(
os
.
path
.
join
(
srcdir
,
'lib'
)):
os
.
mkdir
(
os
.
path
.
join
(
srcdir
,
'lib'
))
if
os
.
fs
.
exists
(
from_path
):
os
.
rename
(
from_path
,
to_path
)
Back
|
FazBrowse Home
|
New Git URL