11import Options , Utils
2+ from subprocess import Popen
3+ import os
24from os import system
35from os .path import exists , abspath
46
@@ -16,21 +18,17 @@ def configure(conf):
1618 conf .check_tool ('compiler_cxx' )
1719 conf .check_tool ('node_addon' )
1820
19- conf .env .append_value ('LIBPATH_GIT2' , abspath ('vendor/libgit2/build/static/' ))
20- conf .env .append_value ('LIB_GIT2' , 'git2' )
21- conf .env .append_value ('CPPPATH_GIT2' , abspath ('vendor/libgit2/build/static/' ))
22-
23- #Popen('git submodule init vendor/libgit2', shell=True).wait()
24- #Popen('git submodule update vendor/libgit2', shell=True).wait()
25- #os.chdir('vendor/libgit2')
26- #Popen('python waf configure build-static', shell=True).wait()
21+ os .chdir ('vendor/libgit2' )
22+ Popen ('python waf configure' , shell = True ).wait ()
2723
2824def build (bld ):
29- #libgit2 = bld.new_task_gen('wafadmin')
30- #libgit2.features = 'waf configure build-static'
31- #libgit2.target = 'libgit2'
25+ Popen ('python waf build-static' , shell = True ).wait ()
3226
3327 obj = bld .new_task_gen ('cxx' , 'shlib' , 'node_addon' )
3428 obj .target = 'nodegit2'
3529 obj .source = 'src/base.cc src/error.cc src/reference.cc src/repo.cc src/commit.cc src/oid.cc src/revwalk.cc'
36- #obj.uselib_local = 'libgit2'
30+ obj .lib = 'git2'
31+ obj .rpath = 'vendor/libgit2/build/static/'
32+
33+ def install (test ):
34+ print dir (test )
0 commit comments