waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

runme.py (716B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 
      4 """
      5 Create a waf file able to read wscript files ending in ".py"
      6 execute a small test to show that it works
      7 
      8 The waf file includes "extpy.py" which performs the required modifications
      9 """
     10 
     11 import os, subprocess
     12 
     13 up = os.path.dirname
     14 join = os.path.join
     15 
     16 cwd = os.getcwd()
     17 extpy = join(cwd, 'extpy.py')
     18 args = 'python waf-light --tools=compat15,%s --prelude=$"\tfrom waflib.extras import extpy\n" ' % extpy
     19 root = up(up(cwd))
     20 
     21 subprocess.Popen(args, cwd=root, shell=True).wait()
     22 os.rename(join(root, 'waf'), join(cwd, 'waf.py'))
     23 
     24 env = dict(os.environ)
     25 if 'WAFDIR' in env:
     26 	del env['WAFDIR']
     27 
     28 subprocess.Popen('python waf.py configure', cwd=cwd, shell=True, env=env).wait()
     29