chiark
/
gitweb
/
~mdw
/
hippotat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wip ownsource system stuff
[hippotat]
/
hippotatlib
/
ownsource.py
diff --git
a/hippotatlib/ownsource.py
b/hippotatlib/ownsource.py
index fab7365825edd0155a934cf6cd4cf346b2af8c0d..4f1db677aa16fcc6b9ac19c4f4f522f139e99ab0 100644
(file)
--- a/
hippotatlib/ownsource.py
+++ b/
hippotatlib/ownsource.py
@@
-33,7
+33,7
@@
class SourceShipmentPreparer():
s.rune_portmanteau = r'''
outfile=$1; shift
rm -f "$outfile"
s.rune_portmanteau = r'''
outfile=$1; shift
rm -f "$outfile"
- GZIP=-
9
tar zcf "$outfile" "$@"
+ GZIP=-
1
tar zcf "$outfile" "$@"
'''
s.manifest_name='0000-MANIFEST.txt'
# private
'''
s.manifest_name='0000-MANIFEST.txt'
# private
@@
-141,17
+141,27
@@
class SourceShipmentPreparer():
d = s.src_parentfinder(d, infol)
s.mk_from_dir(d, infol)
d = s.src_parentfinder(d, infol)
s.mk_from_dir(d, infol)
+ def mk_from_module(s, m, infol):
+ try: file = m.__file__
+ except AttributeError: return
+ infol.append(m.__name__)
+ s.mk_from_src(file, infol)
+ s.manifest_append(None, ['spong',file])
+ #s.report_from_package(file, infol)
+
def mk_from_srcs(s, dirs=sys.path):
s.mk_from_src(sys.argv[0], ['argv[0]'])
for d in sys.path:
s.mk_from_src(d, ['sys.path'])
def mk_from_srcs(s, dirs=sys.path):
s.mk_from_src(sys.argv[0], ['argv[0]'])
for d in sys.path:
s.mk_from_src(d, ['sys.path'])
+ for m in sys.modules.values():
+ s.mk_from_module(m, ['sys.modules'])
def mk_portmanteau(s):
cmdl = s.rune_shell + [ s.rune_portmanteau, 'x',
s.output_name, s.manifest_name ]
mfh = s.open_output_fh(s.manifest_name,'w')
for (name, info) in s._manifest:
def mk_portmanteau(s):
cmdl = s.rune_shell + [ s.rune_portmanteau, 'x',
s.output_name, s.manifest_name ]
mfh = s.open_output_fh(s.manifest_name,'w')
for (name, info) in s._manifest:
- cmdl.append(name)
+
if name is not None:
cmdl.append(name)
print('%s\t%s' % (name,info), file=mfh)
mfh.close()
subprocess.run(cmdl,
print('%s\t%s' % (name,info), file=mfh)
mfh.close()
subprocess.run(cmdl,