Mercurial > cpython-lru_cache-weakref
diff Lib/distutils/command/install.py @ 66439:0cb26526419d
sys.abiflags is not defined on all platforms.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Thu, 25 Nov 2010 03:46:44 +0000 |
| parents | a763ed3d6e8c |
| children | 3e26c9033306 |
line wrap: on
line diff
--- a/Lib/distutils/command/install.py Thu Nov 25 01:34:47 2010 +0000 +++ b/Lib/distutils/command/install.py Thu Nov 25 03:46:44 2010 +0000 @@ -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:
