Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions tools/icu/shrink-icu-src.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,18 @@ def icu_ignore(dir, files):
ign = ign + files
# except...
ign.remove('source')
ign.remove('license.html')
ign.remove('LICENSE')
if 'license.html' in ign:
ign.remove('license.html')
if 'LICENSE' in ign:
ign.remove('LICENSE')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of my head but perhaps if any(item in ign for item in('LICENSE', 'license.html'))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'm going to change the logic a bit here. We want to keep 'LICENSE' || 'license.html' in that order.

elif subdir == 'source':
ign = ign + ['layout','samples','test','extra','config','layoutex','allinone']
ign = ign + ['layout','samples','test','extra','config','layoutex','allinone','data']
ign = ign + ['runConfigureICU','install-sh','mkinstalldirs','configure']
elif subdir == 'source/tools':
ign = ign + ['tzcode','ctestfw','gensprep','gennorm2','gendict','icuswap',
'genbrk','gencfu','gencolusb','genren','memcheck','makeconv','gencnval','icuinfo','gentest']
elif subdir == 'source/data':
ign = ign + ['unidata','curr','zone','unit','lang','region','misc','sprep']
#elif subdir == 'source/data':
# ign = ign + ['unidata','curr','zone','unit','lang','region','misc','sprep']
# else:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, will remove. and the following comments.

# print '!%s! [%s]' % (subdir, files)
ign = ign + ['.DS_Store', 'Makefile', 'Makefile.in']
Expand Down Expand Up @@ -103,6 +105,10 @@ def icu_info(icu_full_path):
shutil.copytree(options.icusrc, options.icusmall, ignore=icu_ignore)
print '%s --> %s' % (src_datafile, dst_datafile)

# now, make the data dir (since we ignored it)
os.mkdir(os.path.join(os.path.join(options.icusmall, "source", "data")))
os.mkdir(os.path.join(os.path.join(options.icusmall, "source", "data", "in")))

# OK, now copy the data file
shutil.copy(src_datafile, dst_datafile)

Expand Down