This commit is contained in:
Thomas Nagy 2011-10-23 08:37:09 +02:00
parent 9af5cc3909
commit c64bd5e317
1 changed files with 11 additions and 8 deletions

View File

@ -1,10 +1,13 @@
#! /usr/bin/env python
"""
Create a tarball of the build results
Create a tarball of the build results. The package command aggregates
the functionality of build, install and dist in a single command.
$ waf configure package
"""
APPNAME = 'pack'
APPNAME = 'ex'
VERSION = '1.0'
top = '.'
@ -49,7 +52,7 @@ class package_cls(Build.InstallContext):
# we could mess with multiple inheritance but this is probably unnecessary
from waflib import Scripting
ctx = Scripting.Dist()
#ctx.arch_name = 'fffffuuuu.tar.bz2'
ctx.arch_name = '%s%s-%s.tar.bz2' % (APPNAME, self.variant, VERSION) # if defined
ctx.files = files
ctx.tar_prefix = ''
ctx.base_path = self.tmp
@ -58,9 +61,9 @@ class package_cls(Build.InstallContext):
shutil.rmtree(self.tmp.abspath())
# for variants, add command subclasses "package_release", "package_debug", etc
#def init(ctx):
# for x in VARIANTS.split():
# class tmp(y):
# cmd = package + '_' + x
# variant = x
def init(ctx):
for x in ['release', 'debug']:
class tmp(package_cls):
cmd = 'package_' + x
variant = x