summaryrefslogtreecommitdiff
path: root/sysconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig.py')
-rw-r--r--sysconfig.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/sysconfig.py b/sysconfig.py
index b51629eb..01ee5197 100644
--- a/sysconfig.py
+++ b/sysconfig.py
@@ -146,8 +146,15 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
prefix = plat_specific and EXEC_PREFIX or PREFIX
if os.name == "posix":
- libpython = os.path.join(prefix,
- "lib", "python" + get_python_version())
+ if plat_specific or standard_lib:
+ # Platform-specific modules (any module from a non-pure-Python
+ # module distribution) or standard Python library modules.
+ libdir = sys.platlibdir
+ else:
+ # Pure Python
+ libdir = "lib"
+ libpython = os.path.join(prefix, libdir,
+ "python" + get_python_version())
if standard_lib:
return libpython
else: