[Python-Dev] PEP about sys.implementation and implementation specific user site directory

M.-A. Lemburg mal at egenix.com
Mon Oct 12 10:55:12 CEST 2009


Christian Heimes wrote:
> sys.implementation
> ------------------
> 
> platform (required):
>   platform or language of the implementation, for example "C", ".NET",
> "Java"

I'd call this attribute "language". We already have sys.platform with
a different meaning.

Possible values would then be "C", "C#", "Java", "Python", etc.

> runtime (required):
>   lower case runtime library of the implementation, for example "libc",
> "msvcrt90", "java6", ".net"
> 
> compiler (required):
>   verbose name of the compiler, for example "GCC 4.3.3", "Java
> HotSpot(TM) Client VM (Apple Inc.)", "Mono JIT compiler version 2.0.1"

If you include the compiler as well, it may make sense to
also add the other creation details that platform.py parses
from the sys.version string:

branch, revision, buildno, builddate

> ...
> 
> 
> sys.userdirsuffix
> -----------------
> 
> sys.userdirsuffix is an implementation and platform specific string that
> is used to construct the path for the user site directory as explained
> in PEP 370. The string contains the implementation name as well as the
> version number of Python.

Don't we already have this information available as site.getuserbase()/
site.getusersitepackages() ?

> Examples:
>   python2.6 (CPython, Unix)
>   Python26 (CPython, Windows)
>   ironpython2.6 (IronPython, Unix)
>   IronPython26 (IronPython, Windows)
>   ...
> 

Since the examples point to the name of the Python stdlib dir
and this form is also used in a lot of other places to distinguish
different Python versions (e.g. in distutils build dirs), perhaps
we should use a more generic name for it like e.g. sys.versiondir ?!

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 12 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-Dev mailing list