Skip to content

Commit

Permalink
simplyfied the zip-building of the examples (lite versions)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzumstein committed Dec 15, 2015
1 parent 6e6143d commit c839617
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 103 deletions.
18 changes: 18 additions & 0 deletions examples/build_lite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os
from zipfile import ZipFile

this_dir = os.path.dirname(os.path.abspath(__file__))
if not os.path.exists(os.path.join(this_dir, '_build')):
os.makedirs(os.path.join(this_dir, '_build'))

for this_dir, dirs, files in os.walk(this_dir):
if '_build' in dirs:
dirs.remove('_build')
for d in dirs:
with ZipFile(os.path.join('_build', d + '.zip'), 'w') as zf:
zf.write(os.path.join(this_dir, d, 'LICENSE.txt'), 'LICENSE.txt')
zf.write(os.path.join(this_dir, d, d + '.py'), d + '.py')
zf.write(os.path.join(this_dir, d, d + '.xlsm'), d + '.xlsm')
if d == 'database':
zf.write(os.path.join(this_dir, d, 'chinook.sqlite'), 'chinook.sqlite')

18 changes: 0 additions & 18 deletions examples/database/build_lite.py

This file was deleted.

17 changes: 0 additions & 17 deletions examples/fibonacci/build_lite.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 0 additions & 17 deletions examples/google_analytics/build_lite.py

This file was deleted.

17 changes: 0 additions & 17 deletions examples/matplotlib/build_lite.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 0 additions & 17 deletions examples/simulation/build_lite.py

This file was deleted.

17 changes: 0 additions & 17 deletions examples/udf/build_lite.py

This file was deleted.

0 comments on commit c839617

Please sign in to comment.