[Distutils] pythonv: let's also make sure the standard Python install includes an "isolated" python

Jim Fulton jim at zope.com
Thu Mar 17 18:23:17 CET 2011


On Thu, Mar 17, 2011 at 12:44 PM, Carl Meyer <carl at oddbird.net> wrote:
>
>
> On 03/17/2011 10:59 AM, Barry Warsaw wrote:
>> On Mar 17, 2011, at 08:07 AM, Jim Fulton wrote:
>>> Whatever mechanism we end up with, I suggest that a standard python
>>> install include an isolated configuration. This is a common use case
>>> and should be available without having to create a virtualenv (or
>>> whatever) for each project or working directory.
>>
>> Could you elaborate on what this means?  I don't quite understand what you
>> mean by "include an isolated configuration".

As I mentioned in an earlier thread, I want to get complete isolation
from local additions relative to the standard Python distribution.
I want python executable I can use to bootstrap a buildout that
doesn't include site packages or it's equivalent.

My understanding of how this will work was that I could created this
myself by creating some sort of configuration file, say clean.cfg and
then link a Python executable to the name "clean".  Reading "pythonv,
take two" more carefully, I see that it is a lot more
virtualenv-oriented than I'd hoped.  <shrug>

> I'm also not entirely clear what this means, but I think perhaps "python
> -S" already covers it?

I thought so too, but people keep telling me that's not enough. One
issue was that maybe site.py might be imported accidentally, for
example to get at one of the helper functions it contains.  I don't
know if this is a significant danger.

I'd like to have some defined way to express my need for isolation
that's more rubust that simply not importing site.py.

> That will start up a python interpreter without
> importing site.py, so it will have no site-packages at all; nothing but
> the stdlib. Of course, then you'd have to take care of fixing up
> sys.path yourself to include your project and its dependencies: this may
> be reasonable for buildout.

Yup.

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton


More information about the Distutils-SIG mailing list