3
# Thomas Nagy, 2005-2010
6
Redistribution and use in source and binary forms, with or without
7
modification, are permitted provided that the following conditions
10
1. Redistributions of source code must retain the above copyright
11
notice, this list of conditions and the following disclaimer.
13
2. Redistributions in binary form must reproduce the above copyright
14
notice, this list of conditions and the following disclaimer in the
15
documentation and/or other materials provided with the distribution.
17
3. The name of the author may not be used to endorse or promote products
18
derived from this software without specific prior written permission.
20
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
21
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
24
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
POSSIBILITY OF SUCH DAMAGE.
36
REVISION="ad4cc42bd7d347f7e283789e711b993f"
47
if sys.hexversion>0x300000f:
53
print(('\033[91mError: %s\033[0m' % m))
56
def unpack_wafdir(dir):
57
f = open(sys.argv[0],'rb')
58
c = 'corrupt archive (%d)'
61
if not line: err('run waf-light from a folder containing waflib')
62
if line == b('#==>\n'):
64
if not txt: err(c % 1)
65
if f.readline() != b('#<==\n'): err(c % 2)
67
if not txt: err(c % 3)
68
txt = txt[1:-1].replace(b(C1), b('\n')).replace(b(C2), b('\r'))
70
import shutil, tarfile
71
try: shutil.rmtree(dir)
74
for x in ['Tools', 'extras']:
75
os.makedirs(join(dir, 'waflib', x))
77
err("Cannot unpack waf lib into %s\nMove waf into a writeable directory" % dir)
89
os.system('bunzip2 t.bz2')
94
try: shutil.rmtree(dir)
96
err("Waf cannot be unpacked, check that bzip2 support is present")
98
for x in t: t.extract(x)
101
for x in ['Tools', 'extras']:
102
os.chmod(join('waflib',x), 493)
104
if sys.hexversion<0x300000f:
105
sys.path = [join(dir, 'waflib')] + sys.path
112
try: dir = unicode(dir, 'mbcs')
115
from ctypes import windll
116
windll.kernel32.SetFileAttributesW(dir, 2)
122
os.stat(join(dir, 'waflib'))
123
return os.path.abspath(dir)
129
base = os.path.dirname(os.path.abspath(name))
132
w=test(os.environ.get('WAFDIR', ''))
136
if name.endswith('waf-light'):
139
err('waf-light requires waflib -> export WAFDIR=/folder')
141
dirname = '%s-%s-%s' % (WAF, VERSION, REVISION)
142
for i in [INSTALL,'/usr','/usr/local','/opt']:
143
w = test(i + '/lib/' + dirname)
147
dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname)
156
sys.path.insert(0, wafdir)
158
if __name__ == '__main__':
159
import waflib.extras.compat15
160
from waflib import Scripting
161
Scripting.waf_entry_point(cwd, VERSION, wafdir)
164
#BZh91AY&SYp2J[������`������������`� $N�� �Aw�a"�a���m� |ͶX�!��Ue۹��k������6իe�{�k�{�x��}w{55��^���}ۺ>��̇O]�6;5���͞���z�}�{P_]������=��}���[���w�>���ǻy���}�����k�� ��@�G�9�=���#)}� +�`ց-x�1�S����k�5�J7gAB����z`�#,�0��*��Р/��� ��_y���_}���w[����PȒ�l�v�t����mK���}�n��o{z���y������7�l��q��sy7{�����m������Ҫ�p^��MG��s::�`�o�}���(����i��R�ׇ����� ����C�g�}�����z����o����� 뮻��k4�\���=��]g`��ѯ�|���vp�[�i�������=�m���������������ζ����n���\ouw���w��t;6����n�yλo�;`���;�#,x{n�Ϫ��w�z�ϟmK��:u�sOowzJ�k������S�{Q�ե�@#)�e��>�B��]��AJM�����%���Gu����������6z�]]����W�w���Kݥ �kg{��� 7�k�wݼ���{V�>����N���F�N�npVu�|������6ʺHF��:<�ۏ��sܭ�;wjeu�]���ʏ�O�|U��냾�q��.���of�ۆ����X�ϋ]/[{f�{Ǟ�T5#,ҊQݣ�ר�u�A�Ъ*9���S�U�w�^�#,�#)9Z>�d5�3y�s��7{z�E��@'�n����E��|�W�� �]H5��;t��}�f��Ԅ ��D���ڥ�UN��w_\n�۫A]���f�>>����ў�}������z��{ǵz������zS�n.�� ��n�n뱭�+����ws����ͫ�_^ﻮ���D;ם��=� ��[�䜊7g۹{��}������/�#,���;ޮ75/�x�ᦈ � M4F �14�M#)2 M#)4���A42l�M ��7�Th����(?T 4 �"d�hhɡOI���&��SO$z�m@4��i� #,DD�Bm&L#SMM�2O='��be$4��A�� $Bd � �M'�4i�Oj��A�#�M5G�j4�@چ�M �I�� ��ҧ��L�SSz���=@ڃ#�h#) 4�&F@����� ��9��24 �h����Ef`���j���'�H"rƀ�36 }� &�� �g���Kտ��e�SZ�ӛ���[��#,�"�b�Q+S��>F���`S�|DB���fA���5��MG+�r�N�s#)x�ܺ]"(ʛz��a�]��:U��ӽ��9��!��O��A%a�# E �D؈f�@1�B� Ԙdx��dDҤ�h�B � 0�4� �`� �(�z�A��*��(����� ��#,i� )�"��b�����@�b%�����"�!�������"�b�i��"���)*J#,H�f����JX�#,"ia"���`�����(�����(�&