13
0
livetrax/waf

154 lines
84 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2009
"""
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
import os, sys
if sys.hexversion<0x203000f: raise ImportError("Waf requires Python >= 2.3")
if 'PSYCOWAF' in os.environ:
try:import psyco;psyco.full()
except:pass
VERSION="1.5.9"
REVISION="88029985309358cf3810fb3b7dd7a519"
INSTALL=''
C1='#.'
C2='#('
cwd = os.getcwd()
join = os.path.join
WAF='waf'
def b(x):
return x
if sys.hexversion>0x300000f:
WAF='waf3'
def b(x):
return x.encode()
def err(m):
print(('\033[91mError: %s\033[0m' % m))
sys.exit(1)
def unpack_wafdir(dir):
f = open(sys.argv[0],'rb')
c = "corrupted waf (%d)"
while 1:
line = f.readline()
if not line: err("run waf-light from a folder containing wafadmin")
if line == b('#==>\n'):
txt = f.readline()
if not txt: err(c % 1)
if f.readline()!=b('#<==\n'): err(c % 2)
break
if not txt: err(c % 3)
txt = txt[1:-1].replace(b(C1), b('\n')).replace(b(C2), b('\r'))
import shutil, tarfile
try: shutil.rmtree(dir)
except OSError: pass
try: os.makedirs(join(dir, 'wafadmin', 'Tools'))
except OSError: err("Cannot unpack waf lib into %s\nMove waf into a writeable directory" % dir)
os.chdir(dir)
tmp = 't.tbz2'
t = open(tmp,'wb')
t.write(txt)
t.close()
try:
t = tarfile.open(tmp)
for x in t: t.extract(x)
t.close()
except:
os.chdir(cwd)
try: shutil.rmtree(dir)
except OSError: pass
err("Waf cannot be unpacked, check that bzip2 support is present")
os.chmod(join('wafadmin','Tools'), 493)
os.unlink(tmp)
if sys.hexversion>0x300000f:
sys.path = [join(dir, 'wafadmin')] + sys.path
import py3kfixes
py3kfixes.fixdir(dir)
os.chdir(cwd)
def test(dir):
try: os.stat(join(dir, 'wafadmin')); return os.path.abspath(dir)
except OSError: pass
def find_lib():
name = sys.argv[0]
base = os.path.dirname(os.path.abspath(name))
#devs use $WAFDIR
w=test(os.environ.get('WAFDIR', ''))
if w: return w
#waf-light
if name.endswith('waf-light'):
w = test(base)
if w: return w
err("waf-light requires wafadmin -> export WAFDIR=/folder")
dir = "/lib/%s-%s-%s/" % (WAF, VERSION, REVISION)
for i in [INSTALL,'/usr','/usr/local','/opt']:
w = test(i+dir)
if w: return w
#waf-local
s = '.%s-%s-%s'
if sys.platform == 'win32': s = s[1:]
dir = join(base, s % (WAF, VERSION, REVISION))
w = test(dir)
if w: return w
#unpack
unpack_wafdir(dir)
return dir
wafdir = find_lib()
w = join(wafdir, 'wafadmin')
t = join(w, 'Tools')
sys.path = [w, t] + sys.path
import Scripting
Scripting.prepare(t, cwd, VERSION, wafdir)
sys.exit(0)
#==>
#BZh91AY&SYD#.ml<02><><EFBFBD><7F><EFBFBD>i<69><7F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><03>06 %<25>S@ `Ha<48>|<7C><><EFBFBD><00><>EEP퐢 M<>f<EFBFBD><66><EFBFBD><EFBFBD>uF<75><46><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D>(<28><>a;i<>CWo]<5D>ٯa<D9AF>n}<7D><0E><>;><3E><><12>Z<>V [<5B><>J<1D><>k<EFBFBD>t<EFBFBD>.<2E><>j<EFBFBD>}<7D>ޞ<EFBFBD>#.<2E><><EFBFBD><EFBFBD>Tzy<7A>#.r<><72>}<7D><><EFBFBD>u<EFBFBD><75>׶<EFBFBD><D7B6><EFBFBD><07>)<29>H <09><><07><01><><EFBFBD>w<EFBFBD>W<EFBFBD><07>}<7D><0E>}m7<6D><37><03>4<EFBFBD><34><EFBFBD>w<1E><>45@(ڂ<>R<>l#.<2E><>Z<>=#(#.<2E><>E@P1<50><31><EFBFBD><EFBFBD><EFBFBD>9{<7B><><EFBFBD>u+<2B><><1A><05>֙Z<D699>lP)+<2B><>}z<17>}9<><39><EFBFBD><EFBFBD>[m<><6D>N <0B><><EFBFBD><EFBFBD><EFBFBD>wzv<7A><76><EFBFBD>VK<56>ǧ<EFBFBD><C7A7><EFBFBD><EFBFBD><EFBFBD>w<EFBFBD><77><EFBFBD>c><3E><><EFBFBD><EFBFBD><EFBFBD>o{<7B><><EFBFBD><EFBFBD>1<EFBFBD>٬<EFBFBD>6<EFBFBD><36>*<2A>fh2Pkl_}<7D>O<EFBFBD><4F><EFBFBD>S<>}<7D><11><><EFBFBD>CM'<0F><><EFBFBD> <20><1E>H<EFBFBD>#(t<><74><EFBFBD><EFBFBD><EFBFBD>9<EFBFBD><39>w<EFBFBD><77>^<5E>n<EFBFBD><6E>so<0F><><EFBFBD>]<5D><><EFBFBD><EFBFBD><EFBFBD>JW<4A>}^<5E>ù<EFBFBD>yz<12>k<EFBFBD><6B><EFBFBD>k;<3B>{s<><73>><3E>ޜ<EFBFBD>9<EFBFBD><39>j<EFBFBD><6A>D8<44><38>;<3B>)<29>yӠ+<2B>1<EFBFBD><31>{}מ<><D79E>w<EFBFBD><77><1D><>=<3D><><<3C>o<EFBFBD><6F><EFBFBD><EFBFBD>^<5E>y<EFBFBD><79><EFBFBD>Z<EFBFBD>v<EFBFBD><76><39><D3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><1B>|<7C><><EFBFBD><EFBFBD>Z<14>gj<67>^<5E><>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>gC<67>n<EFBFBD>g<EFBFBD>7yٹ<79><D9B9>_{s<><73>x<EFBFBD><78>_m{<7B><><EFBFBD><EFBFBD><EFBFBD>|b<><62><EFBFBD>n<EFBFBD><6E><EFBFBD>ޭ{<7B>{G-<2D><><EFBFBD>H<EFBFBD><48>V}<7D>ﻀ7<EFBB80>^w<>w<EFBFBD>/<2F>ѻ]z<>z<EFBFBD>B<EFBFBD><42>#.<2E>2<EFBFBD><32>k<1D><>#P<14><>,սWy.<2E>z<EFBFBD><7A>q<EFBFBD><6D><DD9A>'{<7B><>Jn<19><><EFBFBD>D<EFBFBD><06>k<EFBFBD>}ޟ^<5E><1B><><EFBFBD>@<06>v9<76>ϣ<EFBFBD><CFA3><EFBFBD><EFBFBD><1C><><EFBFBD><EFBFBD>u<EFBFBD>G._g<5F><67><EFBFBD>=L<>{z<>;[<5B><><EFBFBD><EFBFBD>ۮf<DBAE>(<28> i@t<><74><1E><><EFBFBD>k<EFBFBD><6B>ދn<DE8B><6E><EFBFBD>R<>o}<7D>m<EFBFBD><6D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8=}<7D><>}<7D><>hQ<68><51><EFBFBD><EFBFBD>9<EFBFBD>=<3D><>/<2F>ݗ<EFBFBD>!<21><>qosy<73>n<EFBFBD><6E><EFBFBD>{<7B><>\9<><39>}<7D>w<EFBFBD>V<EFBFBD>p<EFBFBD><70> (<28><><EFBFBD>͵w2}h<0F><01><03><>&<26><>S<EFBFBD>{oT<6F><54><EFBFBD><EFBFBD><EFBFBD>z<EFBFBD>U<><55>kV;\<5C>]n<><6E><EFBFBD>w<EFBFBD><77><EFBFBD><1D>sa멧<61><EBA9A7><EFBFBD>m<EFBFBD><6D><EFBFBD><EFBFBD>_w}\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@q<><71><EFBFBD>QU:42<13>c<EFBFBD><63>{^y<><79><EFBFBD>]<5D><>9<EFBFBD>Rw<19><>P7ͩ;<3B><><0E><><EFBFBD><EF8D9D>}<0F>O<EFBFBD><>{<7B><>0<>h`<60>T<EFBFBD>{<7B><><17><><EFBFBD><EFBFBD>w<EFBFBD><77>{<7B>W<EFBFBD>{B<><42><EFBFBD>{<7B><><EFBFBD>y<EFBFBD>Ͻ<EFBFBD><CFBD>S<EFBFBD>;<3B>ё@<40><><EFBFBD><EFBFBD>u<EFBFBD><75>WW<57><57>^<<3C><><1D><>i]}<7D>n<EFBFBD><6E><EFBFBD>n<EFBFBD>uj<75>n<EFBFBD>V<EFBFBD><56>o^<5E>><3E><>=<01><>lWAE<0E>y<>]kV<6B><56>{<7B><><EFBFBD><EFBFBD><EFBFBD>b<EFBFBD><6D><CF8B>)<29>{<7B>e<EFBFBD>i<EFBFBD><00> M4<4D>&<26>M2`<60><>#hML<4D>40<34><30>M4ѓ<34><04><>@@<11>&F)<29>T<EFBFBD><54><EFBFBD><EFBFBD><<3C><><EFBFBD>l<EFBFBD><6C>#(=@<40><06><04>H <20>4<>M<11>OQ<4F><51>'<27><1E><><EFBFBD><1F><03><><EFBFBD>Q<EFBFBD><51><EFBFBD>2)F<>2jbd5=&OI<4F>Q<>~<7E><>D<EFBFBD>=L<><4C> <0C>M4I@F <20>&F<><46> ?BO!<21>M<EFBFBD><4D><EFBFBD><EFBFBD>3&MLjbhM<18>4$ <20>CB<43><42><EFBFBD>i<><69><EFBFBD><EFBFBD><EFBFBD>T<EFBFBD><54><EFBFBD><EFBFBD>ʟ<EFBFBD>=<3D>i<EFBFBD>=A<>z<EFBFBD><7A>;<><7F><EFBFBD>"<22>eM<65>J <0C><><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD>`<60>KU#.<2E>Ȫ<03>W<><57><EFBFBD><EFBFBD>V<EFBFBD>W+<2B>X{<7B>X<EFBFBD><58>V<56><C2AA><EFBFBD>_L<>KV8Y<38>5<EFBFBD><18>2<EFBFBD><32><EFBFBD>o<EFBFBD><6F>uTV(<28><><08>=<3D><>>R<>Ʀem<65>j_(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>T=\V <0B>ħyt<79>UO<55>a<EFBFBD>U<EFBFBD>^<5E>K<EFBFBD><4B><EFBFBD>XC<58><43><EFBFBD>8U"<22>UV<55>PjT<03><1C>&P܀><3E><08>*<2A>yWR<57>#.?ˎ"<22><01>D@C<>*" AA<04><>KJ<4B><4A>@@TI0<10>IE@D0A-(BS<12>A1T<31>#(HDIE%MIQ,<2C>4-P4!3 DS3D<>QT#.<2E>KQQDTKU<14>L<EFBFBD>D0Q%5Q,<2C>I)DRԠ*A%RJAD<>JD<>$BHĔ<48>TI,3,K#(4<>K<14>4DčT<C48D>)EL<45><4C>UT4D,S33UMPTCD<43>AE LQT<51>MAJ<41>DQ0UCRQC1),Ĥ<>4<EFBFBD>1QTLDUR<>EQAE D$<24>QDM!IM$5U<04>$<24><>RRR4<52>QEQA1L4<>EU%12RAE)T<><54>QC5U45Q-R<>TQA<04>ID0<>RU%4<> @UH<55><04>P<EFBFBD>EDT<44>Q<14>PIDD<44>TQETQAMQSL<53>TM4D<34>T<>4<EFBFBD>RRM<04>,<2C>I$<14>)3CD<43><14><>0<EFBFBD>T<>Q-EEE%4UD԰UDUL<55>D<EFBFBD>T3TTILDS<14>K0<4B><30>PIAMQM33MJ<>A <0C>LBC2<43>QCPIIQRP<52>% HEU,IU52U0D<30><44><10>QQMU<04>#(UQ<14>EURUD<04>A-A535AT4<54>D<>%%A<12>DED5I<14>ALT<>TU3I<14>D<EFBFBD><44>A3BDID<14>4RS@DR<44><14>#(A#( S<04>UK@SLT<4C>LD<4C>#(#(IA<04>P<>)CUд<><D0B4>KCAP<>5TT%L<>A%UL<55>E<14>$0UUIMHHDT<44>Q!AEUP<55>U$<24>TU PUUI 0<>CSD<><10> RPADEQT<51>PTD5LU4T<34>3P<33><50>JST<53><54><01>#(0T-ԥ#(D<><44><EFBFBD>AU <0C>U @0TD<54>IIQ 34<33>D<EFBFBD>ERQAQEL<45><4C>UQE CIKAUEMBEQE4<45><34>RDABL<42>HHT<48>-%%CQD<51>R%!+$<24><><14>H<EFBFBD>C$$ S,<2C>R<EFBFBD><52><EFBFBD>ЁB4PDH!B<>!@-ALH@<40><>R<EFBFBD><14>-4@KM5E4A1R<31>RB<10>#A0D<30>D<EFBFBD>@<40>*+-R<>TBUDT003 #( R<> J<>RD@A$<24>C<04>4D<34> <0C>LIP<12><><EFBFBD>0<EFBFBD>@T<>LCTTD<54>U5DD1#(#!STI4D<34>Q,R%,<2C>AUCEUTQA$<24>UQ!E#(LA,@<40><14>S<12>0A1UK0<4B>LSLԄD<14>CK0<4B>0M!<12>K@ADP-T<>CH<43>5T4R<34>ED<45>P<EFBFBD>L4<4C>D<EFBFBD><44><EFBFBD>#.A<14>M,<14>SHLR%CT!5E@<40>UE,<2C>LTR<54>P<EFBFBD>%M4% A0TT<54>MBS<04>JQED<>*D<>Q <0C>TEAJQDT <>D<EFBFBD>1HQ4IUE <10>4Q%IBD<42>D<EFBFBD>2IQ<14>T3E#(%1M4<4D>HQ,<2C>R<14>M4<4D>D<EFBFBD>AD4<44>DT<44>E3U<04>Q3IT<49>114<><34>U13L%C0-P<><50>PR%T<>AI3LL<4C> U%C$B<><42>ԑ5D<35> BDAD<41>0<14>14-#CAHDEPQB<51>H<EFBFBD>(Q$<24>U<04>T<EFBFBD><54>P<EFBFBD>0S@QHUH<>0<EFBFBD>E#(3<04>%#(#(U!SK#.<2E>5-3 MIIARD4P<34><04>EQQKT<4B><12>%!TL<54>P<EFBFBD><50>RQT#(!JAD<41>@<40>D4AA$5PMT<4D>05T<35>AD<> R5-#(C<10>AL4DTCMUR<10>R<>-33QD<>H<EFBFBD>@U1P4- TI*<2A><14>IQI1 DIR<>B<>T<>,H<14><>Q)H<><48>Q+J<>P<EFBFBD>J<04>2<EFBFBD>R<EFBFBD>H<EFBFBD>L<EFBFBD>Q$UPQ<10>RI <20> H<>TDCC$<24>R5CT<43>L5SE4<45>SLP@U#(R<>T<>E4<14>M,<2C><14>D<10>TTL<>TEA2<41>L<EFBFBD><4C>@ED<45>J<EFBFBD>A)H<02>P+AT<41>P<EFBFBD>Q5EPTPD<50><10>D<EFBFBD>P<EFBFBD>QE%%4WR<57>hj<68><6A><EFBFBD><EFBFBD>#.<2E><><EFBFBD>/<2F><>ά<EFBFBD><CEAC>0<EFBFBD><30>D<EFBFBD>h<EFBFBD>~h<><68><EFBFBD><EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>N<EFBFBD><4E><EFBFBD><EFBFBD> " <09># 5fg<66>8ɚ<><C99A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>O&<26><>m<6D>a#(7<>)'<27><><EFBFBD>!<21><04><><EFBFBD><EFBFBD><EFBFBD>]<5D><>3Yfe<66>_<5F><EF9DB5><77>pe:g]<5D><><EFBFBD><EFBFBD>%L<1B>_<EFBFBD><0F>]<5D>E\<5C><>ю<><D18E><EFBFBD>š<EFBFBD><C5A1><EFBFBD>7M<37><19><>#(P<13><><EFBFBD>%<25>0<EFBFBD>wMA<4D>.*C<>x<EFBFBD><78>=<3D>ˬ<EFBFBD><CBAC>쮜h#(DfPx<50><78><EFBFBD><EFBFBD><10>A<10>_<>k<EFBFBD><6B>)qdNa<4E>/<2F>q<EFBFBD><71><EFBFBD><EFBFBD>HQB<51>n5Z<35><5A>29<32><39><EFBFBD>b<EFBFBD><62><EFBFBD><EFBFBD>r<EFBFBD>\<5C>E<EFBFBD>,#vx<76><78><EFBFBD><EFBFBD>?<3F><><EFBFBD><>P<EFBFBD>;<3B><01>B<EFBFBD><42><EFBFBD>u<1F>ǝ<EFBFBD><10>v<EFBFBD><76><EFBFBD>#(4<>ad<><64><EFBFBD><EFBFBD>REyRȕeu<65><75>:P<>6m<36><6D>1y<31><79>~o<0F><>Ƹdk "<22><><EFBFBD>2u<01>K<EFBFBD>ah<61>ho<68>*<2A>tgѴ]<5D>9M<39><4D><EFBFBD>t<EFBFBD>|t<><74>x#(<28>4Y;̦<><CCA6><44>j.<18><><EFBFBD>#Sg<53><67>&<26>"<22>ՒoX<6F><58><EFBFBD><EFBFBD><11>H:<3A><>\d#QA<51>\<5C>leAٓ"}/8F<38><46><EFBFBD>4<EFBFBD><34><EFBFBD>ݙ7<DD99>l<EFBFBD><6C><EFBFBD><19>l<EFBFBD><6C>%<25><>W##(<28>d<EFBFBD>M<EFBFBD><4D>oxV<78>߆m<DF86>df6<66>!<21>*<2A><01><>i<EFBFBD><69><EFBFBD>#.<2E>+<08><><EFBFBD>IG3<47><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD>c<EFBFBD><63>|1r8<>L<18> <20>a<EFBFBD>V[5<><35><EFBFBD>pl<70>w<EFBFBD><77><EFBFBD>$<24>ѣR<>Rj<52> <20>Ä= <20>S<EFBFBD>J݄Z<DD84>|m5<6D><35>HaW>?<3F><><EFBFBD><EFBFBD>8<EFBFBD><38><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>Y<0F>e}<7D><6F><D59E>ۡ<0F><><EFBFBD><EFBFBD><EFBFBD>IV<49>+<2B>x<EFBFBD><78><EFBFBD>5<7F><35><EFBFBD><EFBFBD>&"i<>f#(<28>%<25><><EFBFBD><EFBFBD><EFBFBD><75>1<><31><EFBFBD>Sy<53> <20>"<22><>ܽŠ <0C><>aX8<58><38><16>l<EFBFBD><6C>8<EFBFBD>XD<58>nH_9<5F>,Q{+;5<>G<EFBFBD>x?k5<6B>i<EFBFBD><69>e<EFBFBD><65><EFBFBD><EFBFBD>V<EFBFBD>><3E>Ru<52>8<EFBFBD>F<>J<EFBFBD>lo'<03><><EFBFBD><08>'<27>mFjc6ֵ<36>B<><42>\X<><10>T05<30>#.8<EFBFBD><EFBFBD>WL"m<>lɍc<C98D><63><04><>G[c+ Uq<><71><EFBFBD>H<EFBFBD>*<2A><1B><>o<EFBFBD>}<7D><>͍<EFBFBD><CD8D>7M<>9i+hy#Y#}9<>lch<63><00><><EFBFBD>I<EFBFBD>Ǎ4P<34>P<>Yb<59><62>ۛ<EFBFBD><DB9B><01><><EFBFBD>p<EFBFBD><70><EFBFBD>v<>1<EFBFBD><31>՞<EFBFBD><D59E> <0F>oFN`<60> 1Ev<45><76><EFBFBD><EFBFBD>u
#<==