This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients eric.araujo, georg.brandl, ned.deily, ronaldoussoren, tarek
Date 2012-06-26.06:19:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340691574.39.0.996245547498.issue15184@psf.upfronthosting.co.za>
In-reply-to
Content
This test failure points at a few issues:

 - The CFLAGS modification should only be taking place on OS X systems.  AFAICT, all of that code is protected by sys.platform checks.  One possible culprit, though, might be distutils test test_unixccompiler which attempts to test various platforms by mocking sys.platform.  It so happens that "darwin" is the first platform it tests and, while the test setup and teardown does preserve and restore the get_config_var function in distutils.sysconfig, it doesn't preserve the module global _config_vars which distutils.sysconfig uses to cache the results of parsing the Makefile.  I wonder what happens if test_unixccompiler happens to be the first caller of distutils.sys_config_vars().  I think it will get invoked with sys.platform = 'darwin' and trigger the customization code on what becomes the cached copy for remaining tests.  I'm attaching a patch to preserve and restore the cached values as well.  Georg, I'd appreciate it if you could try this on your system.

 - More importantly, the test failure shows that the code we added for Xcode 4 support in Issue13590 only addressed distutils.sysconfig and not the identical code in standalone sysconfig.  With the removal of packaging in 3.3, AFAIK there now is nothing in the standard library that should depend on this at the moment but it will undoubtedly be an issue for distutil2 and future packaging features.  We had discussed dealing with this by factoring out the common customization code into a separate module to avoid DRY but I didn't get that done.  I'm attaching a first rough patch that does that; it is only very lightly tested and so should not be a candidate for 3.3.0b1.

I recommend the following steps:
  1. For 3.3.0b1, either ignore the test failure or add a skip for 3.3.0b1.  (This failure will also likely show up if OS X installer users attempt to run the tests.)
  2. Resolve the test failure on non-OS X platforms.
  3. Test and review the refactoring patch and plan to push it for 3.3.0rc1.
  4. Post 3.3.0, regardless of the outcome of the proposed packaging PEPs, finally replace distutils.sysconfig with sysconfig.  Attempting to continue to maintain both of them is just asking for more trouble.
History
Date User Action Args
2012-06-26 06:19:34ned.deilysetrecipients: + ned.deily, georg.brandl, ronaldoussoren, tarek, eric.araujo
2012-06-26 06:19:34ned.deilysetmessageid: <1340691574.39.0.996245547498.issue15184@psf.upfronthosting.co.za>
2012-06-26 06:19:33ned.deilylinkissue15184 messages
2012-06-26 06:19:32ned.deilycreate