[Python-checkins] r87105 - python/branches/py3k/Doc/whatsnew/3.2.rst

raymond.hettinger python-checkins at python.org
Tue Dec 7 02:47:52 CET 2010


Author: raymond.hettinger
Date: Tue Dec  7 02:47:52 2010
New Revision: 87105

Log:
Add entry for the new sysconfig module.

Modified:
   python/branches/py3k/Doc/whatsnew/3.2.rst

Modified: python/branches/py3k/Doc/whatsnew/3.2.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.2.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/3.2.rst	Tue Dec  7 02:47:52 2010
@@ -762,6 +762,65 @@
 
 .. XXX add optimize flags for py_compile/compileall (issue10553)
 
+* The new :mod:`sysconfig` module makes it straight-forward to discover
+  installation paths and configuration variables which vary across platforms and
+  installs.
+
+  The module offers access simple access functions for platform and version
+  information:
+
+  * :func:`~sysconfig.get_platform` returning values like *linux-i586* or
+    *macosx-10.6-ppc*.
+  * :func:`~sysconfig.get_python_version` returns a Python version string in
+    the form, "3.2".
+
+  It also provides access to the paths and variables corresponding to one of
+  seven named schemes used by :mod:`distutils`.  Those include *posix_prefix*,
+  *posix_home*, *posix_user*, *nt*, *nt_user*, *os2*, *os2_home*:
+
+  * :func:`~sysconfig.get_paths` makes a dictionary containing installation paths
+    for the current installation scheme.
+  * :func:`~sysconfig.get_config_vars` returns a dictionary of platform specific
+    variables.
+
+  There is also a convenient command-line interface::
+
+    C:\Python32>python -m sysconfig
+    Platform: "win32"
+    Python version: "3.2"
+    Current installation scheme: "nt"
+
+    Paths:
+            data = "C:\Python32"
+            include = "C:\Python32\Include"
+            platinclude = "C:\Python32\Include"
+            platlib = "C:\Python32\Lib\site-packages"
+            platstdlib = "C:\Python32\Lib"
+            purelib = "C:\Python32\Lib\site-packages"
+            scripts = "C:\Python32\Scripts"
+            stdlib = "C:\Python32\Lib"
+
+    Variables:
+            BINDIR = "C:\Python32"
+            BINLIBDEST = "C:\Python32\Lib"
+            EXE = ".exe"
+            INCLUDEPY = "C:\Python32\Include"
+            LIBDEST = "C:\Python32\Lib"
+            SO = ".pyd"
+            VERSION = "32"
+            abiflags = ""
+            base = "C:\Python32"
+            exec_prefix = "C:\Python32"
+            platbase = "C:\Python32"
+            prefix = "C:\Python32"
+            projectbase = "C:\Python32"
+            py_version = "3.2b1"
+            py_version_nodot = "32"
+            py_version_short = "3.2"
+            srcdir = "C:\Python32"
+            userbase = "C:\Documents and Settings\Raymond\Application Data\Python"
+
+
 Multi-threading
 ===============
 


More information about the Python-checkins mailing list