[Distutils] reservations about pythonv

Carl Meyer carl at oddbird.net
Thu Mar 17 17:32:15 CET 2011



On 03/17/2011 10:56 AM, Barry Warsaw wrote:
> Thanks for helping bolster my memory!  I still think setting $LD_LIBRARY_PATH
> won't be necessary in the majority of cases, so generally no re-exec should
> happen.  I can imagine that if it *were* necessary, an appropriate section in
> the pythonv.conf file would trigger it.  E.g.:
> 
> [env]
> LD_LIBRARY_PATH: /path/to/add
> 
> [pythonv]
> re-exec: true

I also realized last night that if the need for LD_LIBRARY_PATH is as
rare as it seems to be, people could just as well set it themselves
before running stuff in their virtualenv. We could even have our shell
"activate" script set it, so you'd only have to set it yourself if using
the virtualenv's binary directly without "activate." I'm a bit tempted
in this direction, as the whole auto-re-exec business feels like it
introduces an entirely different level of magic. But if it would make
life easier, it shouldn't be hard to do.

Since I'm finding and parsing pythonv.conf in site.py, would it be
acceptable to do the exec there? Or are there good reasons for it to
happen earlier in C code? (I'm a bit loath to have to find and parse
pythonv.conf twice).

If we do this, I'd also appreciate (for the PEP) a more concrete
real-life example of what you might try do in a a virtualenv that would
require this.

Carl


More information about the Distutils-SIG mailing list