More Python quirks

Eric S. Raymond esr at thyrsus.com
Fri Nov 25 00:53:24 UTC 2016


Hal Murray <hmurray at megapathdsl.net>:
> I think the problem was that it finds the compiled stuff off in 
> $build/main/pylib, but can't find the source do do a check, so it runs the 
> old compiled versions.  That was because I didn't run waf build 'cause I 
> didn't think I needed it.

You should, at this point, assume that you need to run "waf build" any time
anything in the Python library changes.  Not the client code, like ntpq, but
anything in pylib.

> I expected python to automagically rebuild the compiled versions.

And it used to work that way.  Until you clued me in about --out and
I realized that the magic link needed to forward to the build directory
rather than the pylib source directory.

> Will that get fixed if you add a sym link back to the 
> source?

It's possible.  The rule is that Python builds a foo.pyc when, and *only* when,
you import foo.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list