Python libs on Debian/Raspbian
Gary E. Miller
gem at rellim.com
Tue Dec 19 03:32:27 UTC 2017
Yo Hal!
On Mon, 18 Dec 2017 19:12:58 -0800
Hal Murray via devel <devel at ntpsec.org> wrote:
> Gary said:
> > PYTHONPATH, sys.path, or site.addsitedir(), the same options we
> > keep dancing around.
>
> They generally add things to the search path. I want to remove
> things.
Just add the local location to the front of the PYTHONPATH. That is
what I do.
Also, many other options in PEP 370:
https://www.python.org/dev/peps/pep-0370/
You can not remove the system Python dirs, you need them for all the
standard python modules that NTPsec includes, like io, sys, argparse...
> I'm trying to avoid using the system or local libraries to make sure
> I'm testing the new libraries that I want to test.
Yup.
> Can I write a small wrapper that will patch sys.path and then call
> the code I want to run?
Dunno. Outside of my experience, we are all a bit lost here...
Also, I found a lot of people talking about PYTHONPATH and sys.path
say to ignore all that and use virtualenv:
http://www.virtualenv.org/
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem at rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20171218/1c08f891/attachment.bin>
More information about the devel
mailing list