Should we actually change sys.prefix?

Issue #10 open
Carl Meyer
repo owner created an issue

I'm wavering about whether it's actually a good idea to change sys.prefix. I think in terms of the semantics of sys.prefix, leaving it pointing to the actual location of the standard library and full python installation might be more sensible, and introducing a new sys.virtual_prefix or some such to point to the virtual environment

The determinant here is whether there are more tools that currently rely on sys.prefix to find site-packages, or to find the standard library. In Python itself, outside of distutils/sysconfig it appears to me that it's the latter. And as far as I'm aware, external tools that need to find site-packages generally rely on and distutils/sysconfig to find it, and we can make sure both of those do the right thing wrt a new sys.virtual_prefix.

Comments (2)

  1. Carl Meyer reporter

    Oh, I will. This was more of a note to myself to make sure not to forget the question; I want to phrase the question more carefully and clearly with supporting documentation when I ask on distutils-sig.

  2. Log in to comment