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.

classification
Title: Identify modules which couldn't be built
Type: Stage:
Components: Distutils Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: skip.montanaro Nosy List: loewis, skip.montanaro
Priority: normal Keywords: patch

Created on 2007-03-04 21:31 by skip.montanaro, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
missing.diff skip.montanaro, 2007-03-05 14:24
Messages (6)
msg52046 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2007-03-04 21:31
A user has been moaning on c.l.py that Python's setup.py doesn't bail out when the necessary bits can't be found to build a particular extension module (curses in this case).  For reasons that should be obvious to this crowd you simply can't have it stop if a particular module can't be built.

This patch is a compromise.  It enumerates the modules for which the necessary build mojo exists and those modules for which it doesn't.  I'm personally a bit ambivalent about it, both the need for it and my particular implementation.  An alternate implementation might create a set of all module names at the start of the run then subtract the modules which could be built from that.  This implementation has the slight advantage that all the fiddling for a particular module occurs near the tests for that module.

Skip
msg52047 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-03-05 09:18
I don't think the modules that it builds successfully need to be printed - the build messages will tell, anyway.

I'm not sure when it prints these things. IMO, they should be printed at the end of the build (i.e. after all modules have been built). It should also print out, in summary, modules that had been attempted to build, but where building failed for some reason.
msg52048 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2007-03-05 14:24
Martin,

Thanks for the feedback.  Attached is an updated diff.  It defers the
report until build_ext is finished and reports only on what couldn't
be built, either because the environment was missing something or
because the compile/link phase failed.  These two different problems
are reported in different paragraphs, e.g.:

    Failed to find the necessary bits to build these modules:
    _md5              _sha              _sha256
    _sha512           gdbm              linuxaudiodev
    ossaudiodev       spwd              sunaudiodev


    Failed to build these modules:
    _elementtree



File Added: missing.diff
msg52049 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2007-03-05 14:25
Tweak summary.
msg52050 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-03-06 10:15
Some nits: 
- the max computation can be simplified as
  longest = max(len(e.name) for e in self.extensions+self.failed)

- The sort can be simplified as
  lst.sort(key=str.lower)

There is a change to xmlrpclib in this patch that probably isn't meant to be part of it.

Otherwise, it looks fine, please apply.
msg52051 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2007-03-06 15:42
Checked in as r54166.  I applied the sort() change but not the
max() change.  Note that self.extensions is a list of Extension instances while self.failed is a list of strings.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44657
2007-03-04 21:31:41skip.montanarocreate