Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdist.py
More file actions
Latest commit
executable file
·35 lines (27 loc) · 906 Bytes
/
Copy pathdist.py
File metadata and controls
executable file
·35 lines (27 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
# encoding: utf-8
"""
dist.py
Bundle up the libraries into individual zips and an omnibus collection
Created by Christian Swinehart on 2014/04/21.
Copyright (c) 2014 Samizdat Drafting Co All rights reserved.
"""
importsys
importos
fromglobimportglob
fromos.pathimportdirname, basename, join
py_root=os.path.dirname(os.path.abspath(__file__))
_mkdir=lambdapth: os.path.exists(pth) oros.makedirs(pth)
dist_root=join(py_root,'dist')
defmain():
_mkdir(dist_root)
libs= [dirname(p) forpinglob('%s/*/__init__.py'%py_root)]
forlibinlibs:
print(lib)
LIBDIR=basename(lib)
ZIP="%s/%s.zip"%(dist_root, LIBDIR)
os.system('ditto -ck --keepParent "%s" "%s"'% (LIBDIR, ZIP))
print("plotdevice-libs")
os.system('zip -r -q "%s/plotdevice-libs.zip" %s'%(dist_root, ' '.join(basename(l) forlinlibs)))
if__name__=="__main__":
main()