[Distutils] Distribute and Python 3.2

Toshio Kuratomi a.badger at gmail.com
Sat Mar 12 15:49:24 CET 2011


On Sat, Mar 12, 2011 at 11:05:50AM +0000, Vinay Sajip wrote:
> 
> P.S. IMO Toshio Kuratomi's fix could be better implemented as
> 
> self.config_vars['abiflags'] = getattr(sys, 'abiflags', '')
> 
> in the same block as all the other self.config_vars[...] assignments.
> 
Committed as:

diff -r f64c2d57df43 setuptools/command/easy_install.py
--- a/setuptools/command/easy_install.py        Tue Feb 22 12:05:49 2011 -0800
+++ b/setuptools/command/easy_install.py        Sat Mar 12 06:47:42 2011 -0800
@@ -202,14 +202,10 @@
                             'prefix': prefix,
                             'sys_exec_prefix': exec_prefix,
                             'exec_prefix': exec_prefix,
+                            # Only python 3.2+ has abiflags
+                            'abiflags': getattr(sys, 'abiflags', ''),
                            }
 
-        try:
-            self.config_vars['abiflags'] = sys.abiflags
-        except AttributeError:
-            # Only python-3.2+ has sys.abiflags
-            self.config_vars['abiflags'] = ''
-
         if HAS_USER_SITE:
             self.config_vars['userbase'] = self.install_userbase
             self.config_vars['usersite'] = self.install_usersite

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20110312/4c42020c/attachment.pgp>


More information about the Distutils-SIG mailing list