Mercurial > cpython-lru_cache-weakref
diff Mac/scripts/MkDistr.py @ 12589:2cc6e6dfe9bb legacy-trunk
Automatically dump distribution folders where I want them, next to the vise scripts.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Fri, 05 May 2000 23:07:43 +0000 |
| parents | bbfe99c2785c |
| children | 92d1ddc1c57f |
line wrap: on
line diff
--- a/Mac/scripts/MkDistr.py Fri May 05 20:44:24 2000 +0000 +++ b/Mac/scripts/MkDistr.py Fri May 05 23:07:43 2000 +0000 @@ -208,15 +208,12 @@ def __init__(self): InitUI() - fss, ok = macfs.GetDirectory('Source directory:') - if not ok: - sys.exit(0) - os.chdir(fss.as_pathname()) + os.chdir(sys.prefix) if not os.path.isdir(':Mac:Distributions'): os.mkdir(':Mac:Distributions') - typedist = GetType() - self.inc = IncMatcher(':Mac:Distributions:%s.include'%typedist) - self.exc = ExcMatcher(':Mac:Distributions:%s.exclude'%typedist) + self.typedist = GetType() + self.inc = IncMatcher(':Mac:Distributions:%s.include'%self.typedist) + self.exc = ExcMatcher(':Mac:Distributions:%s.exclude'%self.typedist) self.ui = MkDistrUI(self) self.ui.mainloop() @@ -259,7 +256,7 @@ rv = rv + self.checkdir(d, 0) return rv - def run(self, destprefix): + def run(self): missing = self.inc.checksourcetree() if missing: print '==== Missing source files ====' @@ -267,6 +264,8 @@ print i print '==== Fix and retry ====' return + destprefix = os.path.join(sys.prefix, ':Mac:Distributions:vise') + destprefix = os.path.join(destprefix, '%s Distribution'%self.typedist) if not self.rundir(':', destprefix, 0): return self.rundir(':', destprefix, 1)
