make_packages: ignore pyc

This commit is contained in:
ThomasV 2015-02-25 06:03:59 +01:00
parent b29038073d
commit ce5808e894
1 changed files with 4 additions and 3 deletions

View File

@ -37,9 +37,10 @@ if __name__ == '__main__':
d = os.path.dirname(target) d = os.path.dirname(target)
if d and not (os.path.exists(d)): if d and not (os.path.exists(d)):
os.makedirs(d) os.makedirs(d)
command = "cp -r %s %s"%(pathname, target) if descr[0]:
print command shutil.copy(pathname, target)
os.system(command) else:
shutil.copytree(pathname, target, ignore=shutil.ignore_patterns('*.pyc'))
# fix google/__init__.py needed by pyinstaller # fix google/__init__.py needed by pyinstaller
n = 'packages/google/__init__.py' n = 'packages/google/__init__.py'