Mercurial > gub
changeset 3608:02066868aff1
Merge branch 'gub' of git+ssh://git.sv.gnu.org/srv/git/lilypond into gub
Conflicts:
gub/installer.py
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Wed, 11 Jul 2007 22:06:18 +0200 |
parents | cc0158c86570 (current diff) aff762cbf5b9 (diff) |
children | 9052781ad513 eea5cd3f738e |
files | gub/installer.py |
diffstat | 2 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/context.py Wed Jul 11 21:59:59 2007 +0200 +++ b/gub/context.py Wed Jul 11 22:06:18 2007 +0200 @@ -47,12 +47,21 @@ self.const = const def __call__ (self): return self.const - + +class SetAttrTooLate(Exception): + pass + class Context: def __init__ (self, parent = None): self._substitution_dict = None self._parent = parent + def __setattr__(self, k, v): + if k <> '_substitution_dict' and self._substitution_dict: + raise SetAttrTooLate((k, self)) + + self.__dict__[k] = v + def get_constant_substitution_dict (self): d = {} if self._parent:
--- a/gub/installer.py Wed Jul 11 21:59:59 2007 +0200 +++ b/gub/installer.py Wed Jul 11 22:06:18 2007 +0200 @@ -21,7 +21,7 @@ self.no_binary_strip_extensions = ['.la', '.py', '.def', '.scm', '.pyc'] self.installer_uploads = settings.uploads self.checksum = '0000' - + assert settings._substitution_dict == None @context.subst_method def version (self): return self.settings.installer_version @@ -279,12 +279,12 @@ def strip_prefixes (self): return Installer.strip_prefixes (self) - def create_tarball (self): + def create_tarball (self, bundle_tarball): self.system ('tar --owner=0 --group=0 -C %(installer_root)s -jcf %(bundle_tarball)s .', locals ()) def create (self): Installer.create (self) - self.create_tarball () + self.create_tarball (self.bundle_tarball) def create_shar (orig_file, hello, head, target_shar): length = os.stat (orig_file)[6] @@ -311,10 +311,8 @@ def create (self): Linux_installer.create (self) target_shar = self.expand ('%(installer_uploads)s/%(name)s-%(installer_version)s-%(installer_build)s.%(platform)s.sh') - head = self.expand ('%(sourcefiledir)s/sharhead.sh') tarball = self.expand (self.bundle_tarball) - hello = self.expand ("version %(installer_version)s release %(installer_build)s") create_shar (tarball, hello, head, target_shar) self.write_checksum () @@ -342,4 +340,5 @@ # 'mingw' : MingwRoot, } - return installer_class[settings.platform] (settings) + installer = installer_class[settings.platform] (settings) + return installer