[Python-checkins] r86744 - python/branches/py3k/Lib/distutils/command/install.py

barry.warsaw python-checkins at python.org
Thu Nov 25 04:46:45 CET 2010


Author: barry.warsaw
Date: Thu Nov 25 04:46:44 2010
New Revision: 86744

Log:
sys.abiflags is not defined on all platforms.


Modified:
   python/branches/py3k/Lib/distutils/command/install.py

Modified: python/branches/py3k/Lib/distutils/command/install.py
==============================================================================
--- python/branches/py3k/Lib/distutils/command/install.py	(original)
+++ python/branches/py3k/Lib/distutils/command/install.py	Thu Nov 25 04:46:44 2010
@@ -313,6 +313,11 @@
 
         py_version = sys.version.split()[0]
         (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
+        try:
+            abiflags = sys.abiflags
+        except AttributeError:
+            # sys.abiflags may not be defined on all platforms.
+            abiflags = ''
         self.config_vars = {'dist_name': self.distribution.get_name(),
                             'dist_version': self.distribution.get_version(),
                             'dist_fullname': self.distribution.get_fullname(),
@@ -323,7 +328,7 @@
                             'prefix': prefix,
                             'sys_exec_prefix': exec_prefix,
                             'exec_prefix': exec_prefix,
-                            'abiflags': sys.abiflags,
+                            'abiflags': abiflags,
                            }
 
         if HAS_USER_SITE:


More information about the Python-checkins mailing list