Mercurial > mxe-octave
comparison tools/pkg-install.py @ 4111:d53c492ab48d
pkg-install.py append to inst/PKG_ADD/DEL it it exists (Bug #47481)
* tools/pkg-install.py
(create_pkgadddel): append to inst/ PKG_ADD/DEL if exists
author | John Donoghue |
---|---|
date | Tue, 22 Mar 2016 08:19:53 -0400 |
parents | 3e78f9bcd779 |
children | bdcbb82d57e2 |
comparison
equal
deleted
inserted
replaced
4110:c8d0dbf634ff | 4111:d53c492ab48d |
---|---|
91 | 91 |
92 def create_pkgadddel (env, packdir, nm): | 92 def create_pkgadddel (env, packdir, nm): |
93 if env.verbose: | 93 if env.verbose: |
94 print "Creating...", nm | 94 print "Creating...", nm |
95 | 95 |
96 instfid = open(env.m_dir + "/" + nm, "w") | 96 instfid = open(env.m_dir + "/" + nm, "a") |
97 if os.path.exists(env.arch_dir) == True: | 97 if os.path.exists(env.arch_dir) == True: |
98 archfid = open(env.arch_dir + "/" + nm, "w") | 98 archfid = open(env.arch_dir + "/" + nm, "w") |
99 else: | 99 else: |
100 archfid = instfid | 100 archfid = instfid |
101 | 101 |
105 m_files = fnmatch.filter(files, "*.m") | 105 m_files = fnmatch.filter(files, "*.m") |
106 for f in m_files: | 106 for f in m_files: |
107 for a in extract_pkg(f, '^[#%][#%]* *' + nm + ': *(.*)$'): | 107 for a in extract_pkg(f, '^[#%][#%]* *' + nm + ': *(.*)$'): |
108 instfid.write("%s\n" % str(a)) | 108 instfid.write("%s\n" % str(a)) |
109 | 109 |
110 # search inst .m files for PKG_ commands | 110 # search src .cc files for PKG_ commands |
111 if os.path.exists(packdir + "/src") == True: | 111 if os.path.exists(packdir + "/src") == True: |
112 srcdir = packdir + "/src" | 112 srcdir = packdir + "/src" |
113 files = list(srcdir + "/" + a for a in os.listdir(srcdir)) | 113 files = list(srcdir + "/" + a for a in os.listdir(srcdir)) |
114 c_files = fnmatch.filter(files, "*.cc") | 114 c_files = fnmatch.filter(files, "*.cc") |
115 for f in c_files: | 115 for f in c_files: |