summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/sysconfig.py
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2002-01-31 18:56:00 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2002-01-31 18:56:00 (GMT)
commit2544f51036c51d87be53f6a5e35e867c8333378a (patch)
tree5f745a0cd4c6d2473af7c6227c9ae5508bf8ffda /Lib/distutils/sysconfig.py
parentc318260a7121149153dcfc213a36ac81d8266875 (diff)
downloadcpython-2544f51036c51d87be53f6a5e35e867c8333378a.zip
cpython-2544f51036c51d87be53f6a5e35e867c8333378a.tar.gz
cpython-2544f51036c51d87be53f6a5e35e867c8333378a.tar.bz2
OS/2 patches by Andrew I MacIntyre for distutils.
Closes patch #435381.
Diffstat (limited to 'Lib/distutils/sysconfig.py')
-rw-r--r--Lib/distutils/sysconfig.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index feaf318..d773f149 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -59,6 +59,8 @@ def get_python_inc(plat_specific=0, prefix=None):
return os.path.join(prefix, "include")
elif os.name == "mac":
return os.path.join(prefix, "Include")
+ elif os.name == "os2":
+ return os.path.join(prefix, "Include")
else:
raise DistutilsPlatformError(
"I don't know where Python installs its C header files "
@@ -110,6 +112,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
return os.path.join(prefix, "Lib")
else:
return os.path.join(prefix, "Lib", "site-packages")
+
+ elif os.name == "os2":
+ if standard_lib:
+ return os.path.join(PREFIX, "Lib")
+ else:
+ return os.path.join(PREFIX, "Lib", "site-packages")
+
else:
raise DistutilsPlatformError(
"I don't know where Python installs its library "
@@ -391,6 +400,23 @@ def _init_mac():
_config_vars = g
+def _init_os2():
+ """Initialize the module as appropriate for OS/2"""
+ g = {}
+ # set basic install directories
+ g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1)
+ g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1)
+
+ # XXX hmmm.. a normal install puts include files here
+ g['INCLUDEPY'] = get_python_inc(plat_specific=0)
+
+ g['SO'] = '.pyd'
+ g['EXE'] = ".exe"
+
+ global _config_vars
+ _config_vars = g
+
+
def get_config_vars(*args):
"""With no arguments, return a dictionary of all configuration
variables relevant for the current platform. Generally this includes