Progress, and a puzzle.
Eric S. Raymond
esr at thyrsus.com
Sat Nov 5 02:27:30 UTC 2016
Hal Murray <hmurray at megapathdsl.net>:
>
> > That's the reason for the ntp symlink in ntpq. If you run pyntpq from
> > there, import ntp should find that link and all should be well. Is "." not
> > on your Python import path?
>
> That's the right question. Thanks.
>
> Who is supposed to setup PYTHONPATH?
The Python interpreter has a default search path for module files.
It includes "." on my system, so I never have to set PYTHONPATH.
If you do set PYTHONPATH, those directories are appended.
> A raw clone has:
> pylib/ntpc.so -> ../build/main/libntp/ntpc.so
>
> That looks like a bug. It won't work if you configure with --out=foo
> (Guess what I normally use.)
I set up some symlinks. That location is symlinked to pylib/ntpc.so.
Anything that reaches pylib through an ntp symlink will see that link
and get the module.
At installation time, the ntpc.so build production in libntp/wscript
has an install_path of ${PYTHONDIR}/ntp, so copy will go there.
I don't know if this works with --out. It depender on whether --out
changes the computation of ${PYTHONDIR}.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
More information about the devel
mailing list