2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 01:46:15 +01:00

When creating the waf script, assume that the 'extras' folder only contains Python files

Files are also listed in a static arbitrary order.
This commit is contained in:
Thomas Nagy 2019-04-23 07:39:19 +02:00
parent 4ed9af0ee9
commit 2e58ac4134
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA

21
wscript
View File

@ -258,20 +258,19 @@ def create_waf(self, *k, **kw):
for x in Options.options.coretools.split(','):
coretools.append(x + '.py')
for d in '. Tools extras'.split():
dd = os.path.join('waflib', d)
for k in os.listdir(dd):
if k == '__init__.py':
files.append(os.path.normpath(os.path.join(dd, k)))
up_node = self.generator.bld.path
for node in up_node.find_dir('waflib').ant_glob(incl=['*.py', 'Tools/*.py', 'extras/*.py']):
relpath = node.path_from(up_node)
if node.name == '__init__.py':
files.append(relpath)
continue
if d == 'Tools' and Options.options.coretools != 'default':
if not k in coretools:
if node.parent.name == 'Tools' and Options.options.coretools != 'default':
if node.name not in coretools:
continue
if d == 'extras':
if not k in add3rdparty:
if node.parent.name == 'extras':
if node.name not in add3rdparty:
continue
if k.endswith('.py'):
files.append(os.path.normpath(os.path.join(dd, k)))
files.append(relpath)
if Options.options.namesfrom:
with tarfile.open(Options.options.namesfrom) as tar: