Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify modules which couldn't be built #44657

Closed
smontanaro opened this issue Mar 4, 2007 · 6 comments
Closed

Identify modules which couldn't be built #44657

smontanaro opened this issue Mar 4, 2007 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@smontanaro
Copy link
Contributor

BPO 1673619
Nosy @loewis, @smontanaro
Files
  • missing.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/smontanaro'
    closed_at = <Date 2007-03-06.15:42:45.000>
    created_at = <Date 2007-03-04.21:31:41.000>
    labels = ['library']
    title = "Identify modules which couldn't be built"
    updated_at = <Date 2007-03-06.15:42:45.000>
    user = 'https://github.com/smontanaro'

    bugs.python.org fields:

    activity = <Date 2007-03-06.15:42:45.000>
    actor = 'skip.montanaro'
    assignee = 'skip.montanaro'
    closed = True
    closed_date = None
    closer = None
    components = ['Distutils']
    creation = <Date 2007-03-04.21:31:41.000>
    creator = 'skip.montanaro'
    dependencies = []
    files = ['7822']
    hgrepos = []
    issue_num = 1673619
    keywords = ['patch']
    message_count = 6.0
    messages = ['52046', '52047', '52048', '52049', '52050', '52051']
    nosy_count = 2.0
    nosy_names = ['loewis', 'skip.montanaro']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1673619'
    versions = ['Python 2.6']

    @smontanaro
    Copy link
    Contributor Author

    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

    @smontanaro smontanaro self-assigned this Mar 4, 2007
    @smontanaro smontanaro added the stdlib Python modules in the Lib dir label Mar 4, 2007
    @smontanaro smontanaro self-assigned this Mar 4, 2007
    @smontanaro smontanaro added the stdlib Python modules in the Lib dir label Mar 4, 2007
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Mar 5, 2007

    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.

    @smontanaro
    Copy link
    Contributor Author

    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

    @smontanaro
    Copy link
    Contributor Author

    Tweak summary.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Mar 6, 2007

    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.

    @smontanaro
    Copy link
    Contributor Author

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant