[Distutils] PEP 513: A Platform Tag for Portable Linux Built Distributions Version

Nathaniel Smith njs at pobox.com
Tue Jan 26 17:13:25 EST 2016


On Tue, Jan 26, 2016 at 2:06 PM, Robert T. McGibbon <rmcgibbo at gmail.com> wrote:
> Virtualenvs have `sys.base_prefix`, so perhaps they could just check whether
> the key exists for their parent environment?

I think only shiny-new "venvs" have this, not old-school virtualenvs:

~$ /usr/bin/virtualenv -p /usr/bin/python2.7 tmp-env
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in tmp-env/bin/python2.7
Also creating executable in tmp-env/bin/python
Installing setuptools, pip...done.
~$ tmp-env/bin/python
Python 2.7.11 (default, Dec  9 2015, 00:29:25)
[GCC 5.3.1 20151205] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.base_prefix
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'base_prefix'

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the Distutils-SIG mailing list