Consider the following wscript
:
- removed
install
oruninstall
commands - no
build
command , butbuild_debug
andbuild_release
commands as we are using a variant build.
import waflib
from waflib.Build import BuildContext, CleanContext, InstallContext, UninstallContext
APPNAME = 'TestApp'
VERSION = '1.0.0'
for x in 'debug release'.split():
for y in (BuildContext, CleanContext):
name = y.__name__.replace('Context','').lower()
class tmp(y):
cmd = name + '_' + x
variant = x
def options(opt):
mctx = waflib.Context.classes
mctx.remove(waflib.Build.InstallContext)
mctx.remove(waflib.Build.UninstallContext)
def configure(conf):
conf.setenv('debug')
conf.setenv('release')
def build(bld):
if not bld.variant:
bld.fatal('call "waf build_debug" or "waf build_release", and try "waf --help"')
It is not possible to run distcheck
on this wscript
:
D:\dev\distcheck>python waf configure distcheck
Setting top to : D:\dev\distcheck
Setting out to : D:\dev\distcheck\build
'configure' finished successfully (0.007s)
New archive created: TestApp-1.0.0.tar.bz2 (sha256='290babcef54fd88ab30b46662f62fe680dc1280ae26a931f2cda3b87382cafe2')
Setting top to : D:\dev\distcheck\TestApp-1.0.0
Setting out to : D:\dev\distcheck\TestApp-1.0.0\build
'configure' finished successfully (0.062s)
Waf: Entering directory `D:\dev\distcheck\TestApp-1.0.0\build'
call "waf build_debug" or "waf build_release", and try "waf --help"
distcheck failed with code 1
I tried to configure the distcheck-args
but this does not help:
D:\dev\distcheck>python waf configure --distcheck-args=configure,build_debug,build_debug
Setting top to : D:\dev\distcheck
Setting out to : D:\dev\distcheck\build
'configure' finished successfully (0.064s)
D:\dev\distcheck>python waf distcheck
New archive created: TestApp-1.0.0.tar.bz2 (sha256='4bf28bc95577749b25dc1cc911f4545b8c06c9fb8bac0c9ba53134bf620d0162')
Setting top to : D:\dev\distcheck\TestApp-1.0.0
Setting out to : D:\dev\distcheck\TestApp-1.0.0\build
'configure' finished successfully (0.017s)
Waf: Entering directory `D:\dev\distcheck\TestApp-1.0.0\build'
call "waf build_debug" or "waf build_release", and try "waf --help"
distcheck failed with code 1
This leaves two questions to me:
- How are the distcheck arguments properly overwritten, that are generated by
Scripting.DistCheck.make_distcheck_cmd
? - How is the check generated by
Scripting.DistCheck.check
of the command output properly overwritten? There is no install dir as there is no install command.
My temporary solution to monkey patch the functions Scripting.DistCheck.make_distcheck_cmd
and Scripting.DistCheck.check
is not very comfortable.