Fixing the build to run python tests

Eric S. Raymond esr at thyrsus.com
Thu Nov 30 03:37:21 UTC 2017


Ian Bruene via devel <devel at ntpsec.org>:
> 
> First issue (blocker)

I see you solved this one already, good work.

> Second issue (non-blocker, but ugly)
> 
> In order to run unit tests on python code the "pytest" waf module is
> required. Attempting to load it normally failed, leading me to believe that
> it was not included in the non-human-readable waf code. After manually
> downloading the relevant file from the waf repo I tried to place it in the
> directory where it should go in theory, resulting in failed imports for
> everything else that has that import path (but is really imported from the
> archive). I also tried to place in in wafhelpers, which failed. Currently in
> the MR for the build changes pytest.py sits in the top level ntpsec/
> directory where it works, but this kind of sloppiness is not how the build
> should be arranged.
> 
> I do not know how to "recompile" waf to include different modules, I don't
> know the beginnings of what I don't know, and I'm not sure that I would do
> it if I did know. Someone with Official Build Wrangling status needs to take
> a look at this.

The bad news is we don't really have an Official Build Wrangler.  The guy who
did the original recipe left the project.  Since then, Matt Selsky and I have
been modifying the recipe as necessary and cursing the fact that the waf book
is a dense mass of cryptic details that conveys little generative knowledge.

To figure out what's going on in the recipe you basically have to
stare at it until little beads of blood pop out of your forehead. We
know only a little more than you do about the general theory of waf
operation.

The only good news is that Fred Wright shows signs of understanding more
about the waf internals than Matt or I do.  You may be able to put your
head together with him and figure it out.  Alternatively you could try
reading the waf book.

I hate to be the guy that tells you to wrestle with this pig, but I'm
overbooked and can't do it myself.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.




More information about the devel mailing list